Identify the server name n database...

tommyboy

Active member
Joined
Jun 21, 2005
Messages
34
Programming Experience
Beginner
Identify the server name n database...[RESOLVED, THANX TO KULROM!!!]

hi...

i need sum1 to guide me on tis prob..

i hv created a program n its usin sql server2000 as backend...
n wen i was creating it , i was testing it wit t payroll database in t localhost in ma pc..

now i wanna noe wen i deployed it n let installed in other pcs..then wen it runs does it wil look for t database name, payroll in local host for tat pc's sql server n failed t system..

coz inside ma prog i hv define few times tat...

Public strConn AsString = "data source=localhost; initial catalog=Payroll;" _
& "user ID=sa;password="

and

Public sConnString AsString = "Provider=SQLOLEDB; data source=localhost; initial catalog=Payroll;" _
& "user ID=sa;password="

so ,
say for example if im installing ma prog in pc named H5 n ma pc is H1..
sope in t pc H5, ill definately hv to register new servergroup from t pc H1 so tat can retrieve for payroll database..but, after wen i installed t prog in h5 n try run it then i beleive it wil look after for payroll database from t localhost for pc h5 rite since ive define such in t code..how can i do such tat it can autoly look for databse named payroll from pc h1 n not from t specific pc's localhost...?

plz assist me..
 
Last edited:
okay mr kUlrOm ,

i try my best to type as clear as i could..

well, I have created a program, namely payroll system using vb.net and sql server 2000 as backend..I have created a database called Payroll and stored it in my computer as in local host server group...

now..if i try install the payroll system in other pc and if i want to run my program from that pc with try establish a server group connection from tat pc to my own pc inorder to read the Payroll database from my pc...is that possible for me to run the payroll system program succesfully without any error especially database connection error when im running it from that "other" pc???

plz let me know if u still can't understand my problem..
i'll try my level best to explain again..
My appologizes if my english is bad :eek:
 
Last edited:
Of course you can but notice that you'd have to change dataSource this time and instead localhost you have to put either name or IP address of the SQL Server instance. If connection string is Public (as i see it is) then you don't need to change anything else ... just dataSource.

HTH
Regards ;)
 
okay , now im able to solve my prob already!

thnx to u kUlrOm! :)
 
Back
Top