Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP 5, SQLEXEC into Oracle Problem
Message
From
16/09/1998 16:50:34
James Phillips
Alternative Mailing Systems
Naperville, Illinois, United States
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00137462
Message ID:
00137499
Views:
13
John,

I am trying to complete the same type of function.
I am using paradox table. I am able to connect to the table but can not run the following code:
ndat=sqlexec(nConnect, "select * from customer where customer.cust_num = 1001", newdata)

Do you know why this will not work?

Thanks James



>The easiest way to do it is to assign the datetime value to a vfp variable, then use the ? to tell VFP to evaluate the variable and send its contents to the ODBC driver. Like this:
>
>m.ltDateTime={08/08/1998 10:00 AM}
>ntest=sqlexec(nconnect, "insert into pmwrkord ;
> (pmwrkord_code, its_current_date) ;
> values (9200007),?m.ltDateTime)")
>
>>I'm having problems with the following command:
>>
>>ntest=sqlexec(nconnect, "insert into pmwrkord ;
>> (pmwrkord_code, its_current_date) ;
>> values (9200007),{08/08/1998 10:00 AM})")
>>
>>The problem is with the datetime field, I can't seem to figure out what the correct syntax to present the date so that it makes it pass through. If I take the "date stuff" off, it works just fine, but leaves me without being able to enter a date. And yes, on the Oracle side, it is a datetime field. And I have to do it this way with hardcoding, because the views won't work on text fields due to something strange with spaces between VFP, ORACLE, and ODBC driver .... Any help is appreciated. Thanks!
>>
>>Laurisa Watkins
>>Seattle Parks Dept.
>>laurisa.watkins@ci.seattle.wa.us
James Phillips
Alternative Mailing Systems
International TeleMagic Master VAR
Shiping / Receiving Systems
(630) 327-1581
(630) 355-0029 FAX
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform