hey everyone need some help again, i have two computers both running in vista ultimate. one is a server and the other is like a terminal. my problem is, how do i connect the terminal to a database which is in the server? please provide me a step by step procedure.. i badly need it, this means life and death to me.LOL but yeah i really need it. please help me again. tnx

btw, we are using visual studio 2008 and sql server 2005.

Recommended Answers

All 9 Replies

What problems are you having are right now? Post your code and issue symptoms. There are a lot of things that could go wrong with an sql connection.

hi sknake, my problem is how will i connect PC-2 to a database in PC-1. my program is actually composed of of 2 sub-programs, one is like a server and the other being the terminal. the server is the one that can make changes on the data base while the terminal is more of displaying what is in the database. PC-1 is the server and PC-2 being the terminal. again, my problem is how can i connect PC-2 to the database in PC-1. i tried searching the net and i found that i need to enable the sql browser and i did it, but to this date, i still cant connect to the database in PC-1. btw, i'm connecting through this code:

constr = "Data Source=CARLSATELITE\SQLEXPRESS;Initial Catalog=server;User ID=sa;Password=sa"
        con = New SqlConnection(constr)

        Try
            con.Open()
            da = New SqlDataAdapter("select * from ann_t", con)
            da.Fill(ds, "ann_t")
            con.Close()
        Catch ex As Exception
            MsgBox(ex.ToString)
        End Try

please help me coz this means life and death to me. seriously.

What happens when you try to connect to the other server? Do you get an exception, and if so can you paste the error? How did you install SQL Server? Is it the full blown edition of SQL Server or the express edition? Did you set up a firewall rule in the server to allow remote connections? There is also an option at install-time for SQL server to enable/disable remote connections. By default SQL Server doesn't allow remote connections (for the express edition anyway) so you may need to configure SQL server to allow remote connections. Also what are the names of the two machines and which has SQL server installed?

i am not sure if its the full version, but most likely, it'll be the express but i will still check on it coz i dont have the installer with me. i also made an exemption in firewall so the sql browser and the other thing that i can't remember. i already configured it to enable remote connection. i installed it with sql server authentication and not with windows authentication. the names of the two PC are Calsatelite (server) and Menchi (terminal) they are both installed with sql server but the database to be accessed is within the C arlsatelite

hi again, i'm pretty much sure now that i'm using the express edition because i configured it to allow remote access. enabled sql browser and the other thing that i cant seem to remember. i also made an exemption in the firewall to make sure that these apps are allowed. i installed it with the sql server authentication and not with the usual windows authentication. btw, the names of the PC are Carlsatelite (server) and Menchie (terminal) both installed with sql server but then, the database to be accessed by Menchie is in Carlsatelite.

tnx in advence and i hope u can help me. T_T

>> i installed it with sql server authentication and not with windows authentication.

That is for password authentication but doesn't have anything to do with remote connections. What happens when you try to connect? I'm assuming you get an exception? Can you post the error on this thread? And have you read the article i posted earlier about configuring sql server to allow remote connection?
http://support.microsoft.com/kb/914277

commented: tnx my problem is no solved. thank you thank you +1

hey i have another question mate, btw, tnx its now working hehe thank you very much. but then i have another question. in my database, i have there a PDF Path, that specifies the Source of a PDF reader in my Project. i was wondering how can i specify that the file path is on the other computer and not on its local hard drive?

Create a new thread for your question since the topic has changed and post a link back here.

Please mark this thread as solved if you have found an answer to your original question and good luck!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.