sql.ini non-standard port

Discussion forum about all things Gupta, OpenText and the community.
memic
Germany
Posts: 61
Joined: 07 Mar 2017, 08:51
Location: Germany

sql.ini non-standard port

Post by memic » 07 Nov 2022, 10:12

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 ?

fausto.lupercio
Ecuador
Posts: 172
Joined: 18 Sep 2017, 15:38
Location: Quito

Re: sql.ini non-standard port

Post by fausto.lupercio » 08 Nov 2022, 01:15

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 do not have the required permissions to view the files attached to this post.

memic
Germany
Posts: 61
Joined: 07 Mar 2017, 08:51
Location: Germany

Re: sql.ini non-standard port

Post by memic » 16 Nov 2022, 13:38

Hi,

with "server,port" it connects to the SqlServer but on the wrong Database :shock:

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().

FRBhote
India
Posts: 2212
Joined: 09 Mar 2017, 05:32
Location: Hyderabad, India

Re: sql.ini non-standard port

Post by FRBhote » 17 Nov 2022, 05:07

Put a break at the SqlConnect and see the value of SqlDatabase

Return to “General Discussion”

Who is online

Users browsing this forum: [Ccbot] and 0 guests