Yeah thanks - I tried your code and it works fine in command window - as expected. However when I run the programme and get to the commit procedure, it falls over again. I am checking someone elses code so I will keep looking for an explanation ! - any other hints gratefully received
Richard
Sorry - code a bit misleading ! - I copied this from the command window and nhandle was 1 ! Checked all return values from sqlexec and these were 1 for OK
I am using VFp to access SQL server and program is on endless loop ! - exit point is @@trancount = 0
code abstract ( with comments on result)
tx = 'SELECT @@TRANCOUNT nTrans'
SQLEXEC(nhandle,tx)
? ntrans **** result is 1
SQLEXEC(1,'commit transaction')
* also tried SQLcommit(nhandle)...
Hi
Using single quotes works fine
however tried removing double quotes on - contract no_ - and error was as follows
An expression of non-boolean type specified in a context where a condition is expected, near 'no_'.
whats all that about ?
Richard
Thanks for that
I am actually VFP programmer using sql in that environment, but our files were moved to SQL server at Christmas. I was having a problem through VFP so tried SQL server direct using the same command line - hence the double quotes - VFP doesn't like spaces !!
No doubt I there will...
If I try
select dbo."Test Company$contract details" ."contract no_" from dbo."Test Company$contract details" - i get a list of contract numbers - all ok
if i try
select dbo."Test Company$contract details" ."contract no_" from dbo."Test Company$contract details" where "contract no_ " = "1"
i...
Thanks Pamela -
The database and table are as detailed and I can fetch data no problem. I Ihave now identified the problem to the updatenamelistand/or updateablefieldlist not being recognised at the back end when I use the cursorgetprop return string. I have now resorted to listing the...
Hi all
New to SQL remote access and tried the following code -
nhandle = SQLCONNECT("test")
? SQLSETPROP(nhandle, "Transactions",2)
sqtext = 'select "Test Company$Contract Details".* from dbo."Test Company$Contract Details" '
? SQLexec(nhandle,sqtext,"projects")
...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.