Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Converting VFP date type to SQL SmallDateTime
Message
From
04/08/2005 16:18:43
 
General information
Forum:
Microsoft SQL Server
Category:
Other
Miscellaneous
Thread ID:
01038556
Message ID:
01038708
Views:
17
>>>
>>>I changed the ".NULL." to "NULL" and still get the error. The syntax error is when I insert the record using SQLEXEC().
>>
>>Can you post your code that generates an error?
>
>This is a simplified version of my code:
>
>
>lfdate = "NULL"
>		
>cSqlInsert = "insert into Company (	MYDATEFLD ) values " + ;
>	"(" + "'" + lfdate + "'" + ")"
>
>nResult = SQLEXEC(hCon,cSqlInsert)	
>
>
Remove your sigle quotes from around the NULL value.
cSqlInsert = "insert into Company (	MYDATEFLD ) values " + ;
	"(" + lfdate + ")"
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform