DSN Less connections to ODBC database
Matthias Rebbe
matthias_livecode_150811 at m-r-d.de
Fri Dec 9 17:11:51 EST 2011
Hi Todd,
do you want to connect to an ODBC data source w/o creating a DSN in ODBC Manager/Administrator on Win/Mac?
If so, there was a discussion in October 2010 in this list with the topic "Does revDB support FileDSN or Connection Strings?"
The following is an example which should work under windows w/o problems.
get revOpenDatabase("ODBC","DRIVER=SQL Server;SERVER=" & tServer\
& ";DATABASE=" & tDBase & ";UID=" & tUser & ";PWD=" & tPw\
& ";Trusted_Connection=No",,,)
On Mac i am using the ActualTech with this connection string:
Driver={Actual SQL Server};Server=192.168.0.1\SQLExpress;Database=NorthWind;UID=sa;PWD=my_password;"
You should not have any spaces around the semi-colons or the assignment operator (the "equals" signs).
Btw.: There is a site http://www.connectionstrings.com/ with a connection string reference.
Regards,
Matthias
Am 09.12.2011 um 22:39 schrieb Todd Geist:
> Hello,
>
> I am experimenting with a generic an ODBC datasource. I can connect using
> revOpenDatabase and DSN, but I would really like to ditch the DSN. Does any
> one know if this is possible? I have tried to just enter the host and port,
> but somehow you need to specify the driver. I did install the driver in
> the same folder as the others. But that didn't help.
>
> Any one try this?
>
> Todd
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list