Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strange Error! SQL Passthrough...
Message
From
03/05/2004 03:45:05
Dorin Vasilescu
ALL Trans Romania
Arad, Romania
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00900294
Message ID:
00900302
Views:
13
Hi
Maybe some setting in SQL Server, or a different date format, so the strinmg is not recognized as a date parameter


>Dorin,
>
>It seems working now! Any idea why? I've using SPT like for quite sometime but it's my first time encountering this error.
>
>I'll post another message after thorough testing.
>
>>Try with parameters, without converting to string:
>>
>>dDate = inven.refdate
>>csqldelete = [DELETE FROM itemldgr Where docdate <= ?dDate]
>>If SQLEXEC(nConn,csqldelete) <= 0
>>   Aerror(car)
>>   MessageBox(Aerror(car(2)))
>>Endif
>>
>>
>>
>>>I'm using VFP8 with SQLSERVER2000 as DB backend. It's my first time encountering this strange error:
>>>
>>>cDate = Dtoc(inven.refdate)
>>>csqldelete = [DELETE FROM itemldgr Where docdate <= ']+cdate+[']
>>>If SQLEXEC(nConn,csqldelete) <= 0
>>>   Aerror(car)
>>>   MessageBox(Aerror(car(2)))
>>>Endif
>>>
>>>Above gives me:
>>>Connectivity Error: [Microsoft][ODBC SQL Server Driver][SQL Server]Syntax error converting character string to smalldatetime data type.
>>>
>>>What's missing???
Previous
Reply
Map
View

Click here to load this message in the networking platform