revOpenDatabase

Roger Eller roger.e.eller at sealedair.com
Tue Apr 16 07:30:19 EDT 2013


You need to first create a new System DSN that is configured to connect to
the database.

http://www.interfaceware.com/manual/creating_odbc.html

~Roger
On Apr 16, 2013 6:19 AM, "Mats Åström" <matsastrom at yahoo.se> wrote:

>
>
> Has anyone used revOpenDatabase to connect to an MS SQL database?
> I have been trying to open an ODBC connection using this:
>
> put revOpenDatabase("ODBC","DRIVER=SQL Server;SERVER=" &
> tServerAndPort & ";DATABASE=" & tDBname & ";UID=" & tUser & ";PWD=" &
> tPsw & ";Trusted_Connection=No",,,) into dbIDThe server connects on port
> 55999 so tServerAndport contains "theServerIPaddress:55999".
> I get this error msg in return:
> [Microsoft][ODBC Driver Manager] Invalid string or buffer length
>
> If only the server IP is provided in the second argument, the resulting
> message is:
> [Microsoft][ODBC Driver Manager] Data source name not found and no default
> driver specified
>
>
>
> The docs says that port is only used only for MySQL an Postgree.
> Does that mean I cannot use revOpenDatabase to connect to an MS SQL
> database on a specific port?
> I am using LC 5.5 on Windows.
>
>
>
> /Mats
> _______________________________________________
> 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