Hi,
I'm having issues with the new SQL Server 2012 odbc driver and VFP9sp(latest). I'm trying to use the new offset and fetch feature that sql 2012 has. So far, all versions of SQL odbc drivers are failing when using... It does get a valid handle, however the SQLexec command is what is failing with a value of 0...
lcDSNLess="driver={SQL Server Native Client 11.0};server=Dazz;uid=sa;pwd=111111;DATABASE=DRI_131"
gnConnHandle=Sqlstringconnect(m.lcDSNLess)
?gnConnHandle
lcSql = 'select top 1000 * from PartyName ' + ;
'order by party_name, page_type, party_type offset 0 rows fetch next 20 rows only'
lnSuccess = SQLExec(gnConnHandle, lcSql, 'MyCursor')
If lnSuccess > 0
Select 'MyCursor'
Browse
SQLDisconnect(gnConnHandle)
Else
Messagebox('Sql Error')
Endif
Thanks, Stanley
I'm having issues with the new SQL Server 2012 odbc driver and VFP9sp(latest). I'm trying to use the new offset and fetch feature that sql 2012 has. So far, all versions of SQL odbc drivers are failing when using... It does get a valid handle, however the SQLexec command is what is failing with a value of 0...
lcDSNLess="driver={SQL Server Native Client 11.0};server=Dazz;uid=sa;pwd=111111;DATABASE=DRI_131"
gnConnHandle=Sqlstringconnect(m.lcDSNLess)
?gnConnHandle
lcSql = 'select top 1000 * from PartyName ' + ;
'order by party_name, page_type, party_type offset 0 rows fetch next 20 rows only'
lnSuccess = SQLExec(gnConnHandle, lcSql, 'MyCursor')
If lnSuccess > 0
Select 'MyCursor'
Browse
SQLDisconnect(gnConnHandle)
Else
Messagebox('Sql Error')
Endif
Thanks, Stanley