Guest notes Report post Posted 02/07/2010 08:11 AM Sir good day,The situation is I need a databse to retrieve the caller number then check the database if they have the same number, get the data on particular field.If the caller number not match to the field of database, get the caller number then save the caller number or insert the new caller number and updated the details. But the result of my VG script not updated the or save the new caller number. Heres my script, which need to choose if you want to hear english or arabic,then the introduction hear in a language which he/she choose to the scriptthen his/her number automatically save to the data and the language he choose so if he called again its automatically the introduction go to the language he choose, no need to choose if arabic or english. See my script as well as my traces" Attachment: x.zip Share this post Link to post
SupportTeam Report post Posted 02/07/2010 08:16 PM The vgEngine log shows: 115421.609 21 5 3 ERROR v7.1.3583.22027 (2009-10-23 12:14:15.00) ConnectAndRun_OleDb : Syntax error in INSERT INTO statement. Your SQL statement is (after $RV replacement): INSERT INTO cid2language (CallerID, Language)VALUES (104, 'EN') maybe you need a space just before VALUES, like this: INSERT INTO cid2language (CallerID, Language) VALUES (104, 'EN') The connection to DB is OK. From vgEngine trace: 115420.781 21 5 3 db oledb connection open call [Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\DR\DR.accdb;Persist Security Info=False;] 115421.390 21 5 3 db oledb connection open returned. Share this post Link to post
Guest notes Report post Posted 02/08/2010 07:52 AM Nothing happen sir even i insert spavce before ant after "Values". Sir may be the extension line is the one i used to call so no inserting data was filled to the table of database?But if still the script is going to choose language, but i always used this extension to call. It must be directly go to the introduction sound if the databse found out the caller is called again.And his previous language he choose is automaticall used ny the script Share this post Link to post
SupportTeam Report post Posted 02/08/2010 10:32 AM Trace shows the problems is with the SQL statement. The database was connected to OK. Everything else looks OK. Can you post the database that you are using (C:\DR\DR.accdb) we can then see the database structure and better comment on what could be the cause of the SQL problem. Maybe you can try using this SQL statement: INSERT INTO cid2language VALUES $RV_CIDNUMBER, '$RV[Lang]' (and if the cid2language table has more then 2 columns then explicitly specify the values for all the other columns in the INSERT statement. Share this post Link to post
SupportTeam Report post Posted 02/08/2010 10:34 AM And please post the vgEngine traces (.ZIped) as well. We'd like to confirm that the problems is still a SQL Syntax issue, and not something else. Share this post Link to post
Guest notes Report post Posted 02/10/2010 05:59 AM And please post the vgEngine traces (.ZIped) as well. We'd like to confirm that the problems is still a SQL Syntax issue, and not something else. Yes sir here are the vgEngine traces sir. Attachement: x.zip Share this post Link to post
SupportTeam Report post Posted 03/11/2010 11:33 AM Trace shows: 095006.923 6 5 3 rv replace end: [iNSERT INTO cid2language VALUES 104, 'EN'] 095006.923 6 5 3 db strDatabaseName=[] strDbConnectString=[Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\DR\DR.accdb;Persist Security Info=False;] sAdoNetFactoriesAvailable=[|System.Data.Odbc|System.Data.OleDb|System.Data.OracleClient|System.Data.SqlClient|VistaDB.NET20|] 095006.923 6 5 3 db using ado.net OleDb data provider: OleDbConnection/OleDbCommand/etc 095006.938 6 5 3 db oledb RunQuery_OleDb UpdateDB, , Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\DR\DR.accdb;Persist Security Info=False;, INSERT INTO cid2language VALUES 104, 'EN' 095006.938 6 5 3 db oledb thread init. 095006.938 6 5 3 db oledb thread started. 095007.017 21 5 3 db oledb ConnectAndRun_OleDb begin. Create connection: [Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\DR\DR.accdb;Persist Security Info=False;] 095007.032 21 5 3 db oledb connection open call [Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\DR\DR.accdb;Persist Security Info=False;] 095007.470 21 5 3 db oledb connection open returned. 095007.563 21 5 3 ERROR v7.1.3583.22027 (2009-10-23 12:14:15.00) ConnectAndRun_OleDb : Syntax error in INSERT INTO statement. So the error is: Syntax error in INSERT INTO statement I think you may need to have brackets around the values being inserted, like this: INSERT INTO cid2language VALUES (104, 'EN') ie: change in script to: INSERT INTO cid2language VALUES ($RV_CIDNUMBER, '$RV[Lang]') you can test issuing SQL queries directly within the database to see see what format SQL queries work and which ones do not. Share this post Link to post