Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Inserting into Oracle9i DB from Visual Basic

413585Feb 16 2004 — edited Apr 9 2004
Hi,

I have a Visual Basic 6.0 application that queries an Oracle database to insert into a table. In some cases it will insert fine and in others it won't. Am I doing something wrong in the way I query the Oracle database? I don't get any errors, it just doesn't insert the data. Here's my code that does not work:

QueryString = "insert into neworcldb10.SpectraDataItem (SpectraDataItemID,SpectraDBID,BandNumber,SpectraData) values " + "(" + CStr(OID.OID) + ", " + CStr(ParentSpectraOID.OID) + ", " + CStr(Band) + ", " + CStr(data) + " );"

DBHandle.Execute querystring, , adCmdText + adExecuteNoRecords

I've copied and pasted the query statement into sqlplus and it works fine there. I thought that it may be my connection, but the program inserts fine in other functions. Any help would be appreciated.

Thanks,

Malina
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 7 2004
Added on Feb 16 2004
13 comments
304 views