Inserting into Oracle9i DB from Visual Basic
413585Feb 16 2004 — edited Apr 9 2004Hi,
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