Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setting ODBC
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00557845
Message ID:
00561894
Views:
43
>That should have read -- Modify the code I gave you below, not the ODBC.PRG code. The code below can go anywhere, just make sure to have a line at the beginning of any method or prg that says #INCLUDE ODBC.H
>lcDriverName = ODBC_MS_ORACLE
>lcSettings = "DSN=Connect1_or_better_description" + chr(0);
> + "Description=Your_Description_Here" + chr(0);
> + "Server=host_name_in_tnsnames.ora_file"+chr(0);
> + "UID=myuserid"
>llModifyDSN = .f. && optional. default is false
>oODBC = newobject('odbc', 'odbc.fxp', llModifyDSN)
>llSuccess = oODBC.CreateUserDSN(lcDriverName, lcSettings)
>oODBC.Release
>return llSuccess

I hope to have this running soon, maybe it's me, getting lost in the translation????? Is what I want to do create a dsn, then execute a SQLExec()
statement to pull down some data.?

I got the odbcdemo.prg to fire with no problems. Do I need to bother with it anymore and was it just for testing? Now about the code above. I created 'go.prg', put the #include ODBC.H on the first line along with the code from above, modified it with my parameters(server,UID) and it bombs out at
"oODBC = newobject('odbc', 'odbc.fxp', llModifyDSN)" saying function arguement,value, type is invalid.
I must be missing in the translation
"Build a man a fire, and he's warm for a day.
Set a man on fire, and he's warm for the rest of his life."
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform