VFP sqlconnect() works, sqltables() will not

VFP sqlconnect() works, sqltables() will not

Post by Bill Blackma » Sun, 15 Mar 1998 04:00:00



Good morning!

I'm working on a Visual Foxpro (VFP) program which, given a target FoxPro
table, will create or recreate a new table in SQL Server. Given that I have
literally hundreds of occasionally-changing FP tables to migrate over and
refresh, I had to tackle something like this!

Anyhow, this is SQL Server 6.5, SP4, client is an NT Workstation (4.0,SP3).
VFP 5.0, Visual Studio service packs applied...

?SQLConnect( 'SQLSRV: Adm_DB', 'sa', '<password>' ) returns a >0 connection
handle, indicating success against this system dsn.
?SQLTables( handle, 'TABLES' ) returns 1, indicating completion and success.
Yet, the VFP cursor (defaults to SQLRESULTS) is always empty. Has the
columns it should, it's just always empty.

Created a system dsn to pubs, then tested the sql calls above -- results
exactly the same!!!

Any suggestions from any of you will be heartily appreciated.
Bill Blackman

 
 
 

1. Ref. SqlSrvr: sqlconnect() works, sqltables() will not. Ideas?

Good afternoon!

I'm working on a Visual Foxpro (VFP) program which, given a target FoxPro
table, will create or recreate a new table in SQL Server. Given that I have
literally hundreds of FP tables to migrate over and refresh, whose
structures occasionally change, I had to tackle something like this!

Anyhow, this is SQL Server 6.5, SP4, client is an NT Workstation (4.0,SP3).
VFP 5.0, Visual Studio service packs applied...

?SQLConnect( 'SQLSRV: Adm_DB', 'sa', '<password>' ) returns a >0 connection
handle, indicating success against this system dsn.
?SQLTables( handle, 'TABLES' ) returns 1, indicating completion and success.
Yet, the VFP cursor (defaults to SQLRESULTS) is always empty. Has the
columns it should, it's just always empty.
It does not matter, in SQLTables(), if you pre-create and supply a cursor,
darn thing still fails...

Created a system dsn to pubs (dsn name SQLSRV Pubs), then tested the sql
calls above -- sqltables always returns no tables.
Tested the ADOWorks (Access97) system dsn; sqlconnect() also works, and
sqltables() returns a list of tables.

Any suggestions from any of you will be heartily appreciated.
Bill Blackman

2. Connection Error

3. VFP: SQLCONNECT() syntax

4. US-CA-PRINCIPAL- MANUFACTURING

5. SQLtables in VC++: not returning data

6. Urgent! Can't print full doc in FM4.0

7. Willing to work for FREE..... to get experience

8. DB info in a Calendar

9. SQLTables, Driver not capable

10. Help: Only INSERT Does not work for ODBC connection setup to VFP database

11. Printing Text Mode in VFP 3.0 does not work the same for Print Server and Workstation

12. ICONs for VFP-Apps, ICONWRKs does not work - ????????

13. SET FILTER (VFP) - Works on NT, not on 95