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
 New to SQL Server Programming
 Sql Server connectivity - parameters

Author  Topic 

romy
Starting Member

6 Posts

Posted - 2007-04-25 : 12:04:26
Hi,

I am new to SQL Server. I want to connet to SQL Server database and fetch records. SQL Server will be present in some other server.

For connecting to SQL Server is it necessary to create DSN. Is it possibel to connect to SQL Server with out DSN

I want following parameters are enough for opening connetion are not:
MyConnObj.Open _
"Provider = sqloledb;" & _
"Data Source=172.16.1.60;" & _
"Initial Catalog=TESTATV;" & _
"User ID=sa;" & _
"Password=p@ssW0rd;"

As per my assumption

Data Source is your server name

Initial Catalog is your database name

please clarify me on this.

thanks

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-04-25 : 12:06:37
Yes that should be fine. DSN is not necessary.

Check out: [url]http://www.connectionstrings.com/?carrier=sqlserver[/url] for different examples of connection strings.

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

romy
Starting Member

6 Posts

Posted - 2007-04-25 : 21:17:18
Hi,

Thanks for your reply.

I need one more clarification. My SQL database does not reisdes in my system it resides in some other system is any other parameter I have to send like via TCP/IP. please clarify me on this.

Thanks
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-04-26 : 00:06:35
No. Specifying network protocols is not part of connection string. You can configure it through Server Network Utility.

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-04-26 : 12:00:31
You mean client network utility? Should be ok as long as sql port is open between two machines.
Go to Top of Page
   

- Advertisement -