VB and Oracle ODBC

From: wangsong <wangs_at_cyberway.com.sg>
Date: 1996/09/30
Message-ID: <324F8B88.149C_at_cyberway.com.sg>#1/1


Hi, there

I'm now using VB 4.0 pro to access Oracle database through ODBC and encounter following problems. I would be very grateful if you could shed any light on these problems.

  1. I try to import a local text file into Oracle table. the way I do it is as following .
     Do until EOF( fileNum )
       line Input #fileNum, nextLine
       sql = FormMyInsertStatement(nextLine)  
       db.Excute sql, dbSqlPassThrough
     Loop

     In the loop, I inconsitently get the error code 3146 which mean "ODBC call failed". checked the SQL statement which 
     cause problem, I found it is a normal statement and works well when I run this statement in SQL PLUS.  

    I try to bypass this problem by using DAO method as following    

      Dim field1 as string, field2 as string

      Do until EOF( fileNum )
       line Input #fileNum, nextLine
       field1 = GetField(nextLine,1) 'function to seperate the nextline into fields
       field2 = GetField(nextLine, 2)
       db.recordset.addnew
							db.recordset("field1") = field1
      	db.recordset("field2") = field2
       db.recordset.update
     Loop

 	   Unfortunatly, I still inconsitently get the error 3146. I have tried these two method with MS SQl Server, they works fine.

     What might be the reason behind. is it caused by VB or Oracle ODBC driver?
 

2.

Sometimes, following a failed odbc call, I get this error message: "The Jet VBA file(VBAJET.DLL for 16-bit versions, or VBAJET32.DLL for 32-bit versions) is missing. Try reinstalling the application that returned the error ". After relaunching the Visual Basic,
it seems OK. What does this message ecxatly mean. When I use MS SQL Server ODBC driver, I never get this message. Received on Mon Sep 30 1996 - 00:00:00 CEST

Original text of this message