?
Solved

oracle connection failed ...pl help

Posted on 2001-07-24
2
Medium Priority
?
168 Views
Last Modified: 2010-05-02
hi
look at set iRS code ....Pl help i am new to VB...
Pl





Private Sub txt_ItemNo_Change()
Dim rRs As Recordset, strSQL As String, g_Pr_Item_No As String, i As Byte
On Error GoTo txt_ItemNo_Change_Error
     If bool_ItemNo = True Then
          For i = 0 To 6: txt_Product(i) = "": Next: bool_ItemNo = False: Exit Sub
     End If

   g_Pr_Item_No = Trim(UCase(txt_ItemNo.Text)): lst_ItemNo.Visible = False
   If Len(g_Pr_Item_No) > 3 Then
       strSQL = "Select  ITEM_NO  From  IC_ITEM_MST " & _
       " Where ITEM_NO Like '" & g_Pr_Item_No & "%' GROUP BY ITEM_NO "
        Set iRs = dbS.OpenRecordset(strSQL, dbOpenSnapshot, dbSQLPassThrough): lst_ItemNo.Clear
          If g_Pr_Item_No <> "" Then
             
              Do While Not iRs.EOF
                  lst_ItemNo.AddItem iRs.Fields(0): iRs.MoveNext
              Loop
              If lst_ItemNo.ListCount > 0 Then lst_ItemNo.Visible = True: bool_ItemNo = False
           End If
   End If: Exit Sub
txt_ItemNo_Change_Error:
CreateErrorLogFile " txt_ItemNo_Change ", g_str_LogErrorFile, Err.Number, Err.Description
End Sub
0
Comment
Question by:ram9999
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 8

Expert Comment

by:Dave_Greene
ID: 6314533
Make you connection first

 ODBC Driver for Oracle

For the current Oracle ODBC Driver from Microsoft:

oConn.Open "Driver={Microsoft ODBC for Oracle};" & _
                   "Server=OracleServer.world;" & _
                   "Uid=myUsername;" & _
                   "Pwd=myPassword;"

For the older Oracle ODBC Driver from Microsoft:

oConn.Open "Driver={Microsoft ODBC Driver for Oracle};" & _
                   "ConnectString=OracleServer.world;" & _
                   "Uid=myUsername;" & _
                   "Pwd=myPassword;"


Or Build a DSN and connect
0
 
LVL 8

Accepted Solution

by:
Dave_Greene earned 150 total points
ID: 6314590
Assuming you have a connection...

strQry = "Select  ITEM_NO  From  IC_ITEM_MST " & _
      " Where ITEM_NO Like '" & g_Pr_Item_No & "%' GROUP BY ITEM_NO "

  Set ADORS = New ADODB.Recordset
 
  ADORS.Open strQry, ADO_CONN, adOpenStatic, adLockBatchOptimistic
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses
Course of the Month10 days, 22 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question