Re: Manuel for ODBC
From: Carsten Bonde (bonde)
Date: 06/23/04
- Next message: Anders Altberg: "Re: finding string of one table in another"
- Previous message: Anders Altberg: "Re: using double-byte character sets (DBCS)"
- In reply to: tnhoe: "Re: Manuel for ODBC"
- Next in thread: Anders Altberg: "Re: Manuel for ODBC"
- Reply: Anders Altberg: "Re: Manuel for ODBC"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 23 Jun 2004 11:53:34 +0200
Hoe,
i'm not aware of any functional differences.
The way you use DSN-Less connections is in code a little different.
lnHandle= SQLConnect("DSN-Name")
instead of
SQLStringConnect(ConnectionString)
In my previous example the connectionsstring is created on the fly. In that
case the program must know the password. If security is an issue, this might
be a reason to use a DSN.
Maybe DSN's are easier to use when you have a DBC (with remoteviews) or
CursorAdaptors. I have less expierence with that one.
Instead of setting up the connectionstring, you can use the API-Function
CreateDSN.
Goes like this:
<snip>
PROCEDURE CreateDsn
LOCAL settings
DECLARE Integer SQLConfigDataSource in odbccp32.dll Integer, Integer,
String, String
settings="DSN=TestMySQL"+chr(0)+;
"Description=MySQL DSN"+chr(0)+;
"DATABASE=test"+chr(0)+;
"SERVER=192.168.100.254"+chr(0)+;
"UID=username"+chr(0)+;
"PASSWORD=secret"
Note: OS <= Win98, use the old driver "MySQL", on other systems
Note: use the current driver: "MySQL ODBC 3.51 Driver"
IF OS(3) >= "5"
=SQLConfigDataSource(0,1,"MySQL ODBC 3.51 Driver",settings)
ELSE
=SQLConfigDataSource(0,1,"MySQL",settings)
ENDIF
<snip>
Cheers
Carsten
"tnhoe" <tnhoe@pc.jaring.my> schrieb im Newsbeitrag
news:cbbcf2$alc$1@news4.jaring.my...
> "Carsten Bonde"
>
> What is the different of ODBC DSN and DSN less connection on VFP/MySQL ?
>
> Regards
> Hoe
>
>
- Next message: Anders Altberg: "Re: finding string of one table in another"
- Previous message: Anders Altberg: "Re: using double-byte character sets (DBCS)"
- In reply to: tnhoe: "Re: Manuel for ODBC"
- Next in thread: Anders Altberg: "Re: Manuel for ODBC"
- Reply: Anders Altberg: "Re: Manuel for ODBC"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|