August 19, 2008 at 1:59 am
I have a system written in Delphi. We recently ported it from using BDE to ADO. I have an installation where I have installed SQL 2005. I attached the existing database used by my system and set the compatibility level to 80 (SQL 2000) which my system is coded to. I am able to connect to the database using the standard parameters using Studio Management or SQLCMD. However my system is unable to connect though another site is working fine using the similar parameters. Below is a sampe of the ADO parameters that my sys tem uses:
ADOCONN='Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;password=pppppppppp;Initial Catalog=
where
pppppppppp = password configured upon installation for the sa user
= my database name
= used the machine name or localhost
The above does not want to work though a similar configuration at another site works. The difference is that the SQL instance at the working side has a specific name while I opted for the 'default' instance when installing this current site.
Any pointers to something that I may have missed?
August 19, 2008 at 5:01 am
Perhaps you used some characters that were filtered out in your post, but your connection string does not include a database name or a server name.
Also, is it possible that you forgot to enable SQL Authentication? I would recommend you switch to Windows Authentication as soon as you can - and in the interim, I would suggest you do not use the sa login for your application. Configure another login with appropriate permissions and keep sa to yourself.
August 19, 2008 at 5:59 am
Here is the string:
ADOCONN='Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;password=password;Initial Catalog=databasename;Data Source=sqlservername'
I used tags in the initial post and these were most probably rejected.
I have also set the server to use mixed mode.
The above connection string is in a ini file of text format. My program uses the ADOCONN tag to read the string in and parse it for the different parameters.
August 19, 2008 at 1:51 pm
Did you enable TCP/IP on your SQL Server instance? It's defaulted to false with 2005
You can check here
C:\WINDOWS\system32\mmc.exe /32 "C:\WINDOWS\system32\SQLServerManager.msc"
August 23, 2012 at 1:38 am
hi, having same prob as explained above. So if theirs any solutions pls reply.
August 23, 2012 at 1:51 am
try to connect with ip and portnumber.
Also check on the actual SQL server,
either TCP/IP and any other required protocol is enabled for sql server or not.
----------
Ashish
August 23, 2012 at 2:38 am
i dont think any protocol prob is thr, since using same sql server we are able to connect thru c# but not with delphi
August 23, 2012 at 2:43 am
try to do the telnet with sqlip sqlportnumber.
Is it responding from both machine?
----------
Ashish
August 23, 2012 at 3:00 am
connection failed is coming
August 23, 2012 at 3:08 am
contact your network team and tell them to open the port on this server.
----------
Ashish
August 23, 2012 at 3:28 am
can u let me knw which port
August 23, 2012 at 3:31 am
can you let me knw which port
August 23, 2012 at 3:55 am
the port which you configured for your sql instance.
by default its 1433.
Check the configuration manager to know the port number of your sql instance.
----------
Ashish
August 23, 2012 at 4:06 am
its port 1433 only..and have checkd with systems..port is open.
connection string we are using as below, and we are accesing sql on server.
'Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=true;' +
'Data Source=' + xxx.xx.xxx.xx+ ';'+
'Initial Catalog=' + db_xyx+ ';'+
'User ID=xyzs;Password=abc'
August 23, 2012 at 4:26 am
ok, thats really surprising as getting two contradictory answer.
You said telnet is failing but network team says the port is open.
the syntax for telnet is :-
telnet ip port
for ex
telnet 1.1.1.1 1433
no comma, nothing else
just mentioning in case you incorrectly did the telnet check
After this, I would like to do one more testing :-
1) Go to start--run--odbcad32.exe
2) It will open the ODBC configuration wizard. Try to do the test connection from here by configuring all the required parameter in "user dsn" or "system dsn" using driver as "sql server"
3) in the server details window, try connecting with ip,portnumber so 1.1.1.1,1433.
Is this working?
----------
Ashish
Viewing 15 posts - 1 through 14 (of 14 total)
You must be logged in to reply to this topic. Login to reply