Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strange Error! SQL Passthrough...
Message
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00900294
Message ID:
00900576
Views:
18
Sergey,

Thanks for the clarification!

>Jess,
>
>You may get this error if date format on SQL Server is different from the one in your VFP program or if your date is out of range of smalldatetime data type. In the first case you can either pass date as SPT parameter or convert it to the format that is always recognizable by SQL Server.
cDate = Dtoc(inven.refdate,1)
>
>>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???
JESS S. BANAGA
Project Leader - SDD division
...shifting from VFP to C#.Net

CHARISMA simply means: "Be more concerned about making others feel good about themselves than you are in making them feel good about you."
Previous
Reply
Map
View

Click here to load this message in the networking platform