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
 Old Forums
 CLOSED - General SQL Server
 How to connect to a hosted SQL Server ?

Author  Topic 

Utpal
Posting Yak Master

179 Posts

Posted - 2002-08-19 : 04:44:20
Hi everybody,
Is it possible to connect to a hosted SQL Server without having SQL Server installed on the client computer ? If yes, please tell me how. The following is the VB code I am using to connect to a SQL Server 7 database on my computer :



Provider = "SQLOLEDB"
UserID = "sa"
Password = "meridian"
DataSource = "NANDI"

With SysConn
.Provider = Provider
.Properties("User ID").Value = UserID
.Properties("Password").Value = Password
.Properties("Data Source").Value = DataSource
.Properties("Initial Catalog").Value = "InvCommon"
.Open
End With



What changes would be required in the code to connect to a hosted SQL Server ?




Edited by - Utpal on 08/19/2002 06:24:02

adhik
Yak Posting Veteran

66 Posts

Posted - 2002-08-19 : 06:42:15
Hi Utpal,

I have used following to connected hosted SQL Server through ASP,
which is not actally shared by many but, its our own.

Dim lstrDbServer : lstrDbServer = "DB Server IP/Name"
Dim lstrUserId : lstrUserId = "abcd"
Dim lstrPassword : lstrPassword = "xxxx"
Dim lstrDBName : lstrDBName = "testdb"
Application("ConString") = "Provider=MSDataShape;DATA PROVIDER=SQLOLEDB;Data Source=" & lstrDbServer & ";User Id=" & lstrUserId & ";Password=" & lstrPassword & ";Database=" & lstrDBName & ";Connect Timeout=10"

finally this connection string is used to create connection with server. (I think u have just add Data base Serve Name in ur string)

With Best Regards,
Adhik



Edited by - adhik on 08/19/2002 06:44:01
Go to Top of Page

Utpal
Posting Yak Master

179 Posts

Posted - 2002-08-20 : 02:37:35
Hi Adhik !
Can you give me the IP name of your database server along with the database name, user id & password and a sample table, with which I could actually try out and assess its performance ? You could give me a dummy table to work on.


Go to Top of Page

Merkin
Funky Drop Bear Fearing SQL Dude!

4970 Posts

Posted - 2002-08-20 : 08:52:38
Hahahahaha

That is a big ask, I wouldn't give anyone access to my databases.

What you want is easy, just change this :

DataSource = "NANDI"

to the url or IP address of the remote server.

Damian
Go to Top of Page

Utpal
Posting Yak Master

179 Posts

Posted - 2002-08-21 : 01:57:11
Thanks Damian !
Actually, that's exactly the answer I was expecting. But still I would like to see the speed on a hosted server for myself.




Edited by - Utpal on 08/21/2002 01:58:53

Edited by - Utpal on 08/21/2002 02:00:14
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2002-08-21 : 04:32:08
Is that the sa password for all your servers?
Can you give us more info as to where they are?


==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

Utpal
Posting Yak Master

179 Posts

Posted - 2002-08-22 : 01:30:51
If I had any of my own servers hosted, I wouldn't have disclosed the password.


Go to Top of Page

adhik
Yak Posting Veteran

66 Posts

Posted - 2002-08-23 : 09:32:26
Thats what i want say utpal, i can't disclose the password
But still i m in search of such Free DB provider on Net.
Try one more www.domaindlx.com

Regards
Adhik

quote:

If I had any of my own servers hosted, I wouldn't have disclosed the password.







Edited by - adhik on 08/23/2002 09:35:03
Go to Top of Page

Utpal
Posting Yak Master

179 Posts

Posted - 2002-08-24 : 01:28:50
quote:

Try one more www.domaindlx.com



It's not provided there either.


Go to Top of Page
   

- Advertisement -