Hi,
i have a Microsoft Sql Server running on a non standard port.
How can I specify the port to use in my sql.ini ?
sql.ini non-standard port
Re: sql.ini non-standard port
Hi,
You can test with
ip,port
Sample:
192.168.10.25,1433
I used this config for connections with ODBC , you can see in the image.
You can test with
ip,port
Sample:
192.168.10.25,1433
I used this config for connections with ODBC , you can see in the image.
You do not have the required permissions to view the files attached to this post.
Re: sql.ini non-standard port
Hi,
with "server,port" it connects to the SqlServer but on the wrong Database
This is my sql.ini connection string:
remotedbname=test,Driver=Sql Server;Server=localhost\myinstance,4444;Database=mydb;AnsiNPW=no;QuotedId=no;AutoTranslate=no;Language=german
SqlConnect(hSql) works fine, but when i query the current Database with 'select db_name()' i get 'master' as result.
I don't know why it connects to the master db.
I could change the db with "use mydb" but i would have to do it on every SqlConnect().
with "server,port" it connects to the SqlServer but on the wrong Database

This is my sql.ini connection string:
remotedbname=test,Driver=Sql Server;Server=localhost\myinstance,4444;Database=mydb;AnsiNPW=no;QuotedId=no;AutoTranslate=no;Language=german
SqlConnect(hSql) works fine, but when i query the current Database with 'select db_name()' i get 'master' as result.
I don't know why it connects to the master db.
I could change the db with "use mydb" but i would have to do it on every SqlConnect().
Re: sql.ini non-standard port
Put a break at the SqlConnect and see the value of SqlDatabase
Who is online
Users browsing this forum: [Ccbot] and 0 guests