Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Large ACCESS 95 ODBC headache
Message
From
14/11/2001 09:59:58
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00580677
Message ID:
00581471
Views:
18
You can't? Huh...imagine that <bg>

Hokay, cut down to a manageable size, the SQL that is getting built works out to the following:

Insert into VendorMaster (pk_vend,localnum,...,enrolldt,...) values
(24884,51228,...,#11/13/2001 15:10:03#,...)

If I step through my build process and try the SQL after adding each field (thank the gods for test beds), it work fine up until the enrolldt - that's when I get the 'Syntax Error'. If I skip the enrolldt, it works - until I hit the next date - datetime field.

Have I mentioned the intense love I'm beginning to feel towards Access 95?



>I cannot see your sql statement from my PC. :) Seruously, try to create insert statement just with key field(s) and datetime filed. If it still doesnt work post code back here.
>
>
>>Ok, I've recovered from the BFoMP and have built my sql statement with the variable VALUES this time, but now when I hit the first date to datetime field, I'm getting a syntax error on BOTH sides (Fox and Access). I noticed in a response you made to another person who has the joy of working with Access about the '#' character needing to be leading and trailing a datetime value, but I still get the Syntax error.
>
>>>Dorris,
>>>
>>>First, there's a limit of 8,192 characters per command line in VFP. If there're more VFP generates 'Syntax error'. Second, you cannot use VFP variables directly in SQL statements in SQLEXEC(). However you can use parameters in SQLEXEC()
msql1 = "Insert into VendorMaster (pk_vend) values (?pkvend)"
>>>x = sqlexec(mchand,msql1,"drslts")
In this example parameter ?pkvend will be substituted with the value of variable m.pkvend before SQL statement is executed.
>
>< snip >
"You don't manage people. You manage things - people you lead" Adm. Grace Hopper
Pflugerville, between a Rock and a Weird Place
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform