Showing posts with label connectivity. Show all posts
Showing posts with label connectivity. Show all posts

Monday, March 26, 2012

ODBC Connectivity problem in Sql Server2005

Hi,

I have created DSN connection with sql server authentication in Sql server 2005. There is message comes "Connection Succeeded".

After I try through my application again asking username and password for the DSN at run time. My application is developed in Powerbuilder 5.0.

The connection string as follows,

SQLCA.dbms= "ODBC"
SQLCA.dBparm = "CONNECTSTRING='DSN=ntm',APPNAME = 'ntm',uid='sa',pwd='sierra'"

Can you help me?

I'm not really sure what Powerbuilder syntax is, but did you try something like:
SQLCA.dBparm ="CONNECTSTRING='DSN=ntm;uid=sa;pwd=sierra'"|||

Thanks for your kind reply..

We have rectified that problem.

sql

ODBC Connectivity problem in Sql Server2005

Hi,

I have created DSN connection with sql server authentication in Sql server 2005. There is message comes "Connection Succeeded".

After I try through my application again asking username and password for the DSN at run time. My application is developed in Powerbuilder 5.0.

The connection string as follows,

SQLCA.dbms= "ODBC"
SQLCA.dBparm = "CONNECTSTRING='DSN=ntm',APPNAME = 'ntm',uid='sa',pwd='sierra'"

Can you help me?

I'm not really sure what Powerbuilder syntax is, but did you try something like:
SQLCA.dBparm ="CONNECTSTRING='DSN=ntm;uid=sa;pwd=sierra'"|||

Thanks for your kind reply..

We have rectified that problem.

ODBC Connectivity Issues

I have a windows 98 pc trying to connect to a sql server running on Windows Server 2003 via a frame relay. The 98 pc will connect to the domain and it is able to ping the server. However, when I try to use my MS Access program that connects to the sql server, I get this error message:

Connection Failed
SqlState: '01000'
Sql ServerError: 11001
[Microsoft][ODBC Sql Server Driver][TCP/IP Sockets] Connection Open (Connect ()).
Connection Failed
SqlState: '08001'
Sql ServerError: 6
[Microsoft][ODBC Sql Server Driver][TCP/IP Sockets] Specified Sql server not found.

I have other pcs that connect to the Sql Server fine but they are located locally in the same building as the server. I've tried connecting through named pipes but for some reason, I get the same error. I have downloaded and installed the new MDAC drivers for the 98 pc. Any suggestions?Just a couple of things to check:

1. Are all the DSN names the same on all machines (are you using linked tables into MSAccess?) Does a DSN name exist on the PC?
2. If they are linked tables into MSAccess, when you linked the table in MSAccess, did you check the "Save Password".
3. Does the user have permissions to the tables in SQL Server? Is their loginID or their domain group set up for permissions to the database?

Hope any of these helps.|||Yes, the DSN names are the same, and the user name and password are the same. There are multiple users that use the "generic" username and password and it works fine for them. I looked into the linked tables idea and this is what happened. When I link the tables in Access, it worked. However, when I exited the program and went back into it, it did not work anymore. Now when I try to link the tables again, it will not let me and the program will not work and I get that error message again. Any other ideas?

Wednesday, March 21, 2012

ODBC connect styring does not work

Porting a C Db-library program to ODBC connectivity for Sql Server 2000 SP4.When SQLDriverConnect(hdbc, GetDesktopWindow(), "DSN=HOST_ODBC_DB;UIDDBMS=usercode2;PWDDBMS=password2;", SQL_NTS, NULL, 0, NULL, SQL_DRIVER_COMPLETE) is used, a dialog window pops up. I enter the password and successfully connect to Sql Server 2000. Of course the usage of SQL_DRIVER_COMPLETE is causing the above "UIDDBMS=usercode2;PWDDBMS=password2;" to be ignored in the connect string.If instead the above connect string is used with SQL_DRIVER_NOPROMPT rather than SQL_DRIVER_COMPLETE the following errors are received:[28000] [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. (18452)[01S00] [Microsoft][ODBC SQL Server Driver]Invalid connection string attribute (0)What is causing this?What is the server working on, only on Windows Authentication or on Mixed Authentication, the (null) indicated that its using Windows Authentication but did not get the credentials from the client because either the client passed SQL Server credentials or the Windows account could not be passed.

HTH, jens Suessmeyer.

http://www.sqlserver2005.de
|||

The database server is configured for both Windows and database server authentication. The original Db-library C program version can connect using either authentication type.

The ODBC ported C program version can connect using a Windows authentication connect string with: SQLDriverConnect(hdbc, GetDesktopWindow(), "DSN=host_ODBC", SQL_NTS, NULL, 0, NULL, SQL_DRIVER_NOPROMPT.

It cannot connect using a database server authentication connect string of "DSN=host_ODBC_DB;UIDDBMS=usercode2;PWDDBMS=password2".

The host_ODBC odbc data source was configured for Windows authentication. The host_ODBC_DB odbc data source was configured for database server authentication.

Why does database server authentication fail?|||

Which ODBC driver do you use?

Can you try using "UID" and PWD" instead of "UIDDBMS" and "UIDPWD"?


This posting is provided "AS IS" with no warranties, and confers no rights.