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
Solved

oracle connection failed ...pl help

Posted on 2001-07-24
2
165 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
  • 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 50 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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying 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

Suggested Solutions

Title # Comments Views Activity
I need help formating a date variable in my VB.Net application 2 60
Put text in a picture ASP.NET C# 2 61
VBA filters 2 65
Send outlook email from VBS Script 2 42
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

860 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