Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cursoradaptor datasource
Message
 
To
17/10/2004 19:55:21
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00952166
Message ID:
00952202
Views:
13
Why not use AERROR() to see why the SQLSTRINGCONNECT() not works?
  .Datasource=SQLSTRINGCONNECT(mysqlconnstr)
  IF .DataSource < 0
     AERROR(aErr)
     MessageBox(aErr[1,2])
  ENDIF
BTW If You want to connection string not to be hard coded why you put it in header file? Why not write it in registry, INI file, table or somewhere else where you can reach it? If You inculde it in Header or #define it you must recompile the entire application each time if the server is changed or any in other changes in connection string.



>I am trying to remove the "hard coded" .Datasource connection string from my Cursor Adaptor. I would like to use a #DEFINE inside an #INCLUDE file, but it doesn't seem to work. I have included the .h file in the class and other #defines in that .h file are working but when I use
>
>.Datasource=SQLSTRINGCONNECT(mysqlconnstr)
>
>the data does not connect.
>
>My .h file has a line with :
>
>#DEFINE mysqlconnstr "driver=sql server;server=webdev;database=shareddata;uid=UID;pwd=pwd"
>
>This conn string works fine inside SQLSTRINGCONNECT
>
>thanks
>
>bonnie
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform