Jump to content


< Back to Forum


 

Odbc Connection


  • Please log in to reply

#1 jiaseby 13 December 2016 - 08:53 AM

I'm trying to create a script where I can query a Visual Foxpro table with an ODBC Connection and the Query Database function.  I emailed support and they suggested I post with a sample of the table zipped up.  

 

This is the copy of the email I sent them.

 

ODBC question.

I have a client that has a Visual Foxpro Database.  I’ve created an odbc connection and am trying to run a “Query Database” on it to test retrieving data.  I’m not sure what should go in the three fields.  The odbc name is “Check”.  It is a table that has 3 fields, they are check,amount,iussed.  In other words check number, amount and issue date.  I wanted to do a very basic Sql query and say the amount.  So I’m guessing I could say “Select check, amount,issued from check where check=’1’.  It fails every time.  I’m guessing because I didn’t put anything in the two previous fields.  I’m not sure what goes in the fields ADO.NET or Connection string.  Any help would be greatly appreciated.



#2 SupportTeam 13 December 2016 - 06:40 PM

Could you also please post VoiceGuide's vgEngine trace file which captures the call during which the connection to this database was attempted.

 

vgEngine trace files are created in VoiceGuide's \log\ subdirectory.



#3 jiaseby 14 December 2016 - 02:37 AM

Here is the log requested.  I'm sure the main reason is I'm setting the script up wrong.  Thanks for any assistance.

  • StoreNumber.jpg


#4 jiaseby 14 December 2016 - 03:26 AM

I posted my reply with the files, but they are not showing up.  Did you get them?



#5 SupportTeam 14 December 2016 - 05:42 AM

Please post the vgEngine tracefiles. They will be named something like this:

 

1212_vgEngine.txt, 1213_vgEngine.txt, etc.

 

The vgEngoine trace files will be in same directory as the CallEvents trace file which you posted before.



#6 SupportTeam 14 December 2016 - 05:54 AM

Did you use the 32-bit "ODBC Data Source Administrator" to create the ODBC connection?

 

From: http://www.voiceguid.../moddbquery.htm :

 

NOTE: on 64 bit systems the 32-bit "ODBC Data Source Administrator" must be used to create the data source. The 32 bit "ODBC Data Source Administrator" can be found at C:\Windows\SysWOW64\odbcad32.exe

 

did you test the connection from within the "ODBC Data Source Administrator" ?



#7 jiaseby 15 December 2016 - 01:09 AM

Hi I did use the 32-bit ODBC Data Source Administrator.  However there isn't a test function option on the Visual FoxPro ODBC connection like on others.  I'm not sure why.  I've attached the vgEngine.txt file from a test I just did.



#8 SupportTeam 15 December 2016 - 07:01 AM

vgEngine shows error is:

 

ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

 

Are you able to try ODBC connection string using the driver name instead of just DSN ?

 

eg. Please see https://www.connecti.../visual-foxpro/ :

 

Driver={Microsoft Visual FoxPro Driver};SourceType=DBF;SourceDB=c:\myvfpdbfolder;
Exclusive=No;Collate=Machine;NULL=NO;DELETED=YES;BACKGROUNDFETCH=NO;