Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB.NET - SQL SERVER

Status
Not open for further replies.

aviles1973

Programmer
May 19, 2002
25
US
I have a couple of questions about a database program I am writing.

I created a test database program using SQLServer2005 from within VB.Net 2005.

Now I want to setup the small test program on another computer on my small network.

What I need to share the database(.mdf) so both computers can read and write to it?

Do I need SQLServerExpress on both compters?

I'm also having some problems with not being able to connect to the database after I open it directly from SQLServer2005 shut it down then reopen it in VB.Net 2005 but when I restart my computer its fine, WHY?

Also, When I create my database and save it in one directly then I transfer it to another and try to connect from VB.net2005 I get errors.

Sorry for the Questions but I'm porting my knowledge from Access to SQLServer2005. Just a little different. :(



 
If you are using SQL Server then:
- You need not to share the data files to users. Keep the server running on one server and let the other users access that DB server by using their authentication. Set the rules, permissions, access rights for those users to your database. Once the users get authenticated by this way, they can use the DB server as per their roles and permissions.
- You need SQL Client to set on those machines.
- Check your installation part if you are facing the problems with accessing the DB server on your local network.
- Take a look at sample database created on SQL server (Pubs, Northwind).
- Before going to settings and configuration, spend some time on SQL books or help that comes with SQL server. That documentation clearly defines all these things.

Sharing the best from my side...

--Prashant--
 
aviles1973 - your comment about the install worries me, with VB.NET a program should be installed on each system where it is to be used. Files associated with the project are not only in the project solution folder but may be in the system32 folder.

Good luck, you have a lot of learning to do.
djj
 
OK Thanks to all! I may sound like a "dummy" with SQLServer2005 but I have actually no problems with creating databases and using ADO.net to manipulte the data!

I was just very unsure of the connection and manipulation of the main Database on a network.

So to recap:

1)I must install my VB.net program on each computer. (I knew that much)

2)Allow SQL Server to be active on the main computer.

3)Install SQL Client on all other networked computers.

4)Configure to permissions to allow access.

Next Question:
Is SQL Client a free download from Microsoft like everything else?






 
3) is a no, you don't need to install the sql-client on all machines.

You will need MDAC2.8 wich is a free download. But in most cases it is already on the winxp machines.

Christiaan Baes
Belgium

"My new site" - Me
 
It is a part of SQL Server. You can install SQL Server or SQL Client as per your requirements. The SQL Client is required if your developers want to interact directly with SQL server by registering the SQL server at their end.

Sharing the best from my side...

--Prashant--
 
Thanks to all! That initial guidance is sometimes all thats needed to learn alot. I actually learned programming that way! Went to school for computer repair!
 
Avilles, it sounds like you're having the same challenges I had with the nuances of DB programming when I started, especially understanding connection objects.

I then discovered a book by William R. Vaughn called "ADO Examples and Best Practices". You'd be hard pressed to find a better source of information on back-end connectivity issues.

Of course, that book was Pre-.NET.

For the ADO.NET arena, you'll want "ADO.NET and ADO Examples and Best Practices for VB Programmers, Second Edition"

He'll walk you through such things as what connection strings to use for almost every conceavable data access paradigm (SQL, Oracle, MDB, text file, etc) and the best possible strategies for data adapter and command object designs.

He covers all the questions you asked in this thread.


Hope this helps.

mongril

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top