Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 Database Design and Application Architecture
 Client PC desktop app. connectivity with DB on Srv

Author  Topic 

Dhuka
Starting Member

8 Posts

Posted - 2010-04-04 : 06:28:06
Hi,
I need a little help with accessing my SQL Server 2000 DB on Server PC from my Client PC. I have successfully configured ODBC connection from Control Panel> Administrative Tools > Data Source (ODBC) on my Client PC but don't have idea about accessing it using ODBC. Don't even have idea about connection string.

Earlier I was using the desktop application on same server as the DB Server but now I want to install the application on client pcs while DB will remain on server only.

My connection string on the application.exe.config is below that I was using when I was having my application and DB on the same server and I wasn't using ODBC for it.:

ConnectionString="Data Source=my-pc;Initial Catalog=MYDBName;Integrated Security=True;user id=myuser;password=mypass;"

I will be waiting for your kind response and solutions. The reason I am using ODBC is to avoid installaing SQL Server Client on Client PCs to save system resources.

Regards,
Zulfiqar

pk_bohra
Master Smack Fu Yak Hacker

1182 Posts

Posted - 2010-04-04 : 12:46:41
Hi,

I think that you need to specify the provider name also..

Just try using the below connection string..
Provider=MSDASQL.1;Password=mypass;Persist Security Info=True;User ID=myuser;Data Source=my-pc;Initial Catalog=MYDBName

You can also refer http://www.connectionstrings.com/ for information on framing the connection string.

If you are getting any error please let us know.

Regards,
Bohra.

I am here to learn from masters and help new bees in learing.
Go to Top of Page

Dhuka
Starting Member

8 Posts

Posted - 2010-04-04 : 16:34:44
I tried out your connection string but it doesn't seem to be working. The connection string in my app.exe.config file is:

<connectionStrings>
<add name="SkypeCallData.Properties.Settings.SkypeCallsConnectionString"
connectionString="Provider=MSDASQL.1;Password=mypass;Persist Security Info=True;User ID=aas;Data Source=mypcIP;Initial Catalog=SkypeCalls"
providerName="System.Data.SqlClient" />
</connectionStrings>
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-04-04 : 16:52:52
Please post the error so that we can help you.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

Dhuka
Starting Member

8 Posts

Posted - 2010-04-05 : 14:32:16
Application crashes!

No specific error.

quote:
Originally posted by tkizer

Please post the error so that we can help you.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-04-05 : 15:36:34
Then run SQL Profiler and capture the Exception event. If an exception doesn't happen in your trace, then the problem is not with SQL Server.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -