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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB.net & MS SQL Server

Status
Not open for further replies.

skinrock

Programmer
Nov 20, 2004
23
US
Hey guys, new here, been trying to get help across various forums, no one is answering. I bought VB.net awhile ago, and I just now started getting into it. I'm making this application that needs to connect to a database, but I'm having a hard time doing it. I have MS SQL, but when I install it, VB.net says that my version of VS can only connect to MSDE and Access databases. Now, I found that there was an MSDE folder inside my VS package, and all it contains is a weblink saying "You don't get MSDE with this version of VS, download it here" and gives me a link. Basically, what I want to know is, what to I have to do to make a database through MSDE? I somehow got it working late last night, but I don't know what I did. Any help would be much appreciated, thanks.
 
vb.net standard edition only connection to msde and access if you use the wizard functions.

If you do your connection via code then the standard edition will not complain and just make the connection.

in msde you make the database via access projects (select new project - new data) or via sql. The first connection you make to the master database ,because that already exists and then you execute the following sql statement.

Code:
CREATE DATABASE dbo.Databasename

Christiaan Baes
Belgium

If you want to get an answer read this FAQ faq796-2540
There's no such thing as a winnable war - Sting
 
Thank you for the response. I was actually wondering if I could get away with using an MS SQL Server database and making the connection in code. I hadn't tried it because I haven't used SQL since about 6 months ago, so it's kind of all just coming back to me.

Also, I don't have Access, so I don't really know of any GUI interface for working with MSDE other than through my vb app (or the aforementioned Access). However, I will reinstall MS SQL Server and see if I can get a connection there.
 
you could install the sql-server client tools. the enterprise manager and queryanalyzer recongise MSDE as an sql-server.

Christiaan Baes
Belgium

If you want to get an answer read this FAQ faq796-2540
There's no such thing as a winnable war - Sting
 
Oh okay, thank you for the quick response, that will make things a little easier.
 
Quick question. Everything is working btw, I have an application that successfully access and updates the database based on user input, but I can only add one person. Basically I'm using a Primary Key on a "uid" (user id) number, and I think I'm hitting the error because it's trying to add a new record with another uid of the same number, which of course would conflict with Primary Key requirements. My question is, how to I turn on Auto Increment in the SQL Sever Enterprise Manager? Also, my SQL Query in the program leaves the uid field blank, which is why I want Auto Increment.
 
I'm not sure how to edit posts, or if I can, so I just wanted to say that I figured it out. I decided to use the SQL Query Analyzer in conjuction with SQL Server Enterprise Manager (I finally realized that "Indentity" was the option I needed). So it works, I am able to add multiple records into the database. Thanks for the help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top