Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Connection dns and deleted Records
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Connection dns and deleted Records
Miscellaneous
Thread ID:
00754905
Message ID:
00754905
Views:
46
Hi All,

I want to have a View creates by a connection ODBC (DNS).
This connection was created by programming.
#DEFINE ODBC_ADD_DSN 1 &&' Add data source
#DEFINE ODBC_CONFIG_DSN 2 &&' Configure (edit) data source
#DEFINE ODBC_REMOVE_DSN 3 &&' Remove data source
#DEFINE vbAPINull 0 &&' NULL Pointer

*'Function Declare
DECLARE LONG SQLConfigDataSource IN ODBCCP32.DLL ;
   LONG hwndParent, LONG fRequest, ;
   STRING lpszDriver, STRING lpszAttributes

LOCAL intRet, strDriver, strAttributes

*'Set the driver to SQL Server because it is most common.
strDriver = "Microsoft Visual FoxPro Driver"  && "SQL Server"
*'Set the attributes delimited by null.
*'See driver documentation for a complete
*'list of supported attributes.
*strAttributes = "SERVER=SomeServer" + CHR(0)

strAttributes = "DESCRIPTION=Temp DSN" + CHR(0)
strAttributes = strAttributes + "DSN=Amline3.0" + CHR(0)
strAttributes = strAttributes + "SourceType=DBC" + CHR(0)
strAttributes = strAttributes + "SourceDB =" + goapp.cdefaultdirectory + "AMLINE.DBC" + CHR(0)
*strAttributes = strAttributes + "UID=sa" + CHR(0)
*strAttributes = strAttributes + "PWD=" + CHR(0)
*'To show dialog, use Form1.Hwnd instead of vbAPINull.
intRet = SQLConfigDataSource(vbAPINull, ODBC_ADD_DSN, ;
   strDriver, strAttributes)
The destroyed records are present in the request but I do not want this result.
What do I have to put in my code not to more have the destroyed records ?

Thank In Advance

Bernhart
Next
Reply
Map
View

Click here to load this message in the networking platform