asergeev
Programmer
- Jul 22, 2003
- 13
Hi,
I'm trying to use VFP 9, but I have problems with the same code that runs fine in VFP8.
This is the code:
RELEASE ALL
CLOSE DATABASES
CLOSE TABLES
CLEAR
LOCAL lctmp AS STRING, lnConnHandle AS INTEGER, lctblname AS STRING
* Creating a connection string
lctmp='Description=ABC Conversion;DRIVER=SQL Server;SERVER=ABC156;UID="sa";PWD="sa";'
lctmp=lctmp+'APP=Microsoft Open Database Connectivity;WSID=ABC156;DATABASE=ABCRTL;Trusted_Connection="Yes"'
* Connecting to Database
lnConnHandle=SQLSTRINGCONNECT(lctmp)
IF lnConnHandle < 0
= MESSAGEBOX('Cannot make connection', 16, 'SQL Connect Error')
RETURN
ENDIF
* Creating the list of all tables in database
SQLEXEC(lnConnHandle,"select * from SYSOBJECTS where TYPE = 'U' order by NAME ","c_sqltbls")
---------
VFP 8 runs without problem. In VFP9 I'm getting error, because SQLEXEC doesn't create the return cursor.
Also I have an application that uses updatable remote views against MS SQL. It runs fine in VFP8, but VFP9 could not update views.
Am I missing something?
Thanks,
AGS
I'm trying to use VFP 9, but I have problems with the same code that runs fine in VFP8.
This is the code:
RELEASE ALL
CLOSE DATABASES
CLOSE TABLES
CLEAR
LOCAL lctmp AS STRING, lnConnHandle AS INTEGER, lctblname AS STRING
* Creating a connection string
lctmp='Description=ABC Conversion;DRIVER=SQL Server;SERVER=ABC156;UID="sa";PWD="sa";'
lctmp=lctmp+'APP=Microsoft Open Database Connectivity;WSID=ABC156;DATABASE=ABCRTL;Trusted_Connection="Yes"'
* Connecting to Database
lnConnHandle=SQLSTRINGCONNECT(lctmp)
IF lnConnHandle < 0
= MESSAGEBOX('Cannot make connection', 16, 'SQL Connect Error')
RETURN
ENDIF
* Creating the list of all tables in database
SQLEXEC(lnConnHandle,"select * from SYSOBJECTS where TYPE = 'U' order by NAME ","c_sqltbls")
---------
VFP 8 runs without problem. In VFP9 I'm getting error, because SQLEXEC doesn't create the return cursor.
Also I have an application that uses updatable remote views against MS SQL. It runs fine in VFP8, but VFP9 could not update views.
Am I missing something?
Thanks,
AGS