VoiceGuide IVR Software Main Page
Jump to content

Inserting into foxpro table

Recommended Posts

I have two tables in the same folder.  One I use to log calls the other I'm pulling information from.  I'm able to do a select, but not an insert.  I've included both SQL requests and the log file.  Does anything jump out?

Thanks

 

0620_1513_vgEngine.txtSQLError.thumb.jpg.e963f77822e9804179dd922f21a575b2.jpg

Share this post


Link to post

The connection to the database (Visual FoxPro?)  is made OK, and the SELECT query returns OK, so the issue looks to be with the INSERT SQL itself.

Are there any log files created by your database which you can look at to see if they have any more information on why this SQL failed?

Have you tried doing a simpler INSERT, for example with just number values?

Have you tried using single quotes: ' instead of the double quotes: " around the string values?

 

151619.366   4   5   5    1       dboledb ConnectAndRun_OleDb begin. Create connection: [Provider=vfpoledb;Data Source=C:\ivrdata\;Collating Sequence=general;]
151619.367   4   5   5    1       dboledb connectionOleDbConn open call [Provider=vfpoledb;Data Source=C:\ivrdata\;Collating Sequence=general;]
151619.384   4   5   5    1       dboledb connectionOleDbConn open returned.
151619.384   4   5   5    1       dboledb [SQLLogCheck] INSERT INTO logfile (check,linenumber,logdate,logtime,linesinuse,type,language) VALUES (7021673379,5,"062019","1516",1,"C",1)

151619.392   4   5   5    1 ERROR v7.6.5 - 7.6.6977.23886 (2019-02-07 13:16:12.65) ConnectAndRun_OleDb : One or more errors occurred during processing of command.

   at System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult hr)
   at System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult)
   at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult)
   at System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult)
   at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method)
   at System.Data.OleDb.OleDbCommand.ExecuteNonQuery()
   at (Object )
   at �.�.�()
151619.394   4   5   5    1       dbcompleted. [SQLLogCheck]  SqlQueryType=NONQUERY, RowsCount=0, sRv=

 

 

Share this post


Link to post

I just wanted to let you know what the issue was in case someone else runs into this.  If you look above at the connection string.  Apparently when you are doing a select you don't have put the file name in, only the folder name.  Once I added the logfile.dbf in the string after the folder name it worked.  

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×