As a part of a test, I try to access VFP Tables through ODBC.

Here is what I do:
o I create a System DSN using "Microsoft Visual ForPro Driver" 2.00.8167.00,
VFPODBC.DLL
o Set the Data Source Name as "mailw"
o Set the Database Type as Visual FoxPro database (.DBC)
o and the path as: "c:\MyApps\Mailw2000\mailw2000.dbc"

Trying:
SQLConnect("mailw")
I get -1 (failure)

If instead, I create the same as above, using "Free table directory" instead
of .DBC
and set the pasth to: "c:\MyApps\Mailw2000"

SQLConnect("mailw") returns a conection handler.
But truing to select data from existing table in the directory, I get -1
again.
h=SQLConnect("mailw")
? SQLExec(h, 'Select * from Names')

Can someone help me?

I tried with Oracle and MySQL, through ODBC and I get no errors.
What do I do wrong with VFP ?

Demetrios, Greece

Re: VFP 6.0 & ODBC by Jack

Jack
Sun Dec 04 18:26:29 CST 2005

Use AERROR to see what error you are getting

On Sun, 4 Dec 2005 23:34:18 +0200, "Demetrios Panayotakopoulos"
<dpan__dp@_ath.forthnet.gr> wrote:

>As a part of a test, I try to access VFP Tables through ODBC.
>
>Here is what I do:
>o I create a System DSN using "Microsoft Visual ForPro Driver" 2.00.8167.00,
>VFPODBC.DLL
>o Set the Data Source Name as "mailw"
>o Set the Database Type as Visual FoxPro database (.DBC)
>o and the path as: "c:\MyApps\Mailw2000\mailw2000.dbc"
>
>Trying:
>SQLConnect("mailw")
>I get -1 (failure)
>
>If instead, I create the same as above, using "Free table directory" instead
>of .DBC
>and set the pasth to: "c:\MyApps\Mailw2000"
>
>SQLConnect("mailw") returns a conection handler.
>But truing to select data from existing table in the directory, I get -1
>again.
>h=SQLConnect("mailw")
>? SQLExec(h, 'Select * from Names')
>
>Can someone help me?
>
>I tried with Oracle and MySQL, through ODBC and I get no errors.
>What do I do wrong with VFP ?
>
>Demetrios, Greece
>

Re: VFP 6.0 & ODBC by Demetrios

Demetrios
Sun Dec 04 23:12:44 CST 2005

Hi Jack,
When using Free tables in DSN:
h=SQLConnect("mailw") --> h>0
SQLExec(h, "Select * from names")

I get the following:
[1] 1526
[2] Connectivity error: [Microsoft][ODBC Visual FoxPro Driver]Unrecognized
command verb.
[3] [Microsoft][ODBC Visual FoxPro Driver]Unrecognized command verb.
[4] 37000
[5] 222
[6] 1
[7] .NULL.
------------------------------------------------
When using .DBC in DSN:
h=SQLConnect("mailw") -->-1

[1] 1526
[2] Connectivity error: [Microsoft][ODBC Driver Manager] Data source name
not found and no default driver specified
[3] [Microsoft][ODBC Driver Manager] Data source name not found and no
default driver specified
[4] IM002
[5] 0
[6] 2
[7] .NULL.

Thanks,

Demetrios, Greece


"Jack Jackson" <jacknospam@pebbleridge.com> wrote in message
news:2927p1pmoeutqa323rhhbu3t1d0vsg0o90@4ax.com...
> Use AERROR to see what error you are getting
>
> On Sun, 4 Dec 2005 23:34:18 +0200, "Demetrios Panayotakopoulos"
> <dpan__dp@_ath.forthnet.gr> wrote:
>
>>As a part of a test, I try to access VFP Tables through ODBC.
>>
>>Here is what I do:
>>o I create a System DSN using "Microsoft Visual ForPro Driver"
>>2.00.8167.00,
>>VFPODBC.DLL
>>o Set the Data Source Name as "mailw"
>>o Set the Database Type as Visual FoxPro database (.DBC)
>>o and the path as: "c:\MyApps\Mailw2000\mailw2000.dbc"
>>
>>Trying:
>>SQLConnect("mailw")
>>I get -1 (failure)
>>
>>If instead, I create the same as above, using "Free table directory"
>>instead
>>of .DBC
>>and set the pasth to: "c:\MyApps\Mailw2000"
>>
>>SQLConnect("mailw") returns a conection handler.
>>But truing to select data from existing table in the directory, I get -1
>>again.
>>h=SQLConnect("mailw")
>>? SQLExec(h, 'Select * from Names')
>>
>>Can someone help me?
>>
>>I tried with Oracle and MySQL, through ODBC and I get no errors.
>>What do I do wrong with VFP ?
>>
>>Demetrios, Greece
>>



RE: VFP 6.0 & ODBC by cindy_winegarden

cindy_winegarden
Mon Dec 05 14:21:02 CST 2005

Hi Demetrios,

The latest FoxPro and Visual FoxPro ODBC driver, version 6.0.8629.1, is
downloadable from http://msdn.microsoft.com/vfoxpro/downloads/updates.

Try that and see if you still get the same errors.

--
Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
cindy_winegarden@msn.com www.cindywinegarden.com
Blog: http://spaces.msn.com/members/cindywinegarden


"Demetrios Panayotakopoulos" wrote:

> As a part of a test, I try to access VFP Tables through ODBC.
>
> Here is what I do:
> o I create a System DSN using "Microsoft Visual ForPro Driver" 2.00.8167.00,
> VFPODBC.DLL
> o Set the Data Source Name as "mailw"
> o Set the Database Type as Visual FoxPro database (.DBC)
> o and the path as: "c:\MyApps\Mailw2000\mailw2000.dbc"
>
> Trying:
> SQLConnect("mailw")
> I get -1 (failure)
>
> If instead, I create the same as above, using "Free table directory" instead
> of .DBC
> and set the pasth to: "c:\MyApps\Mailw2000"
>
> SQLConnect("mailw") returns a conection handler.
> But truing to select data from existing table in the directory, I get -1
> again.
> h=SQLConnect("mailw")
> ? SQLExec(h, 'Select * from Names')


Re: VFP 6.0 & ODBC by Demetrios

Demetrios
Tue Dec 06 07:51:17 CST 2005

Ohh...thank you so much Cindy.
The latest driver did work indeed.

Demetrios, Greece

"Cindy Winegarden" <cindy_winegarden@msn.com> wrote in message
news:25C969C9-900C-4F89-A81D-2AFDD0C27C3A@microsoft.com...
Hi Demetrios,

The latest FoxPro and Visual FoxPro ODBC driver, version 6.0.8629.1, is
downloadable from http://msdn.microsoft.com/vfoxpro/downloads/updates.

Try that and see if you still get the same errors.

--
Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
cindy_winegarden@msn.com www.cindywinegarden.com
Blog: http://spaces.msn.com/members/cindywinegarden


"Demetrios Panayotakopoulos" wrote:

> As a part of a test, I try to access VFP Tables through ODBC.
>
> Here is what I do:
> o I create a System DSN using "Microsoft Visual ForPro Driver"
> 2.00.8167.00,
> VFPODBC.DLL
> o Set the Data Source Name as "mailw"
> o Set the Database Type as Visual FoxPro database (.DBC)
> o and the path as: "c:\MyApps\Mailw2000\mailw2000.dbc"
>
> Trying:
> SQLConnect("mailw")
> I get -1 (failure)
>
> If instead, I create the same as above, using "Free table directory"
> instead
> of .DBC
> and set the pasth to: "c:\MyApps\Mailw2000"
>
> SQLConnect("mailw") returns a conection handler.
> But truing to select data from existing table in the directory, I get -1
> again.
> h=SQLConnect("mailw")
> ? SQLExec(h, 'Select * from Names')