• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 822
  • Last Modified:

Sample SQL database with VB.Net code ...?

I have recently installed visual studio 2005 and I will be using VB to access data in an SQL database.

My question is easy...

When I previously used MS Access there was a sample database called "Northwind" which was a good source of sample code.

Is there an equivalent type of sample database which I can download written for vb.net 2005 with a SQL Server database??

The items on the setup CD are of no use so far- I couldn't get them to work.

0
JaneRogers
Asked:
JaneRogers
  • 5
  • 4
1 Solution
 
bruintjeCommented:
Hello JaneRogers,

it's the itworks db and the sample come with the sql server installation

you could also look for other samples like
http://www.microsoft.com/Downloads/details.aspx?familyid=E719ECF7-9F46-4312-AF89-6AD8702E4E6E&displaylang=en
http://www.novicksoftware.com/Presentations/clr-programming-dotnet-sql-server-2005-yukon/clr-dotnet-sql-server-2005-yukon.htm

hope this helps a bit
bruintje
0
 
JaneRogersAuthor Commented:

I tried the second link, downloaded the file and unzipped everything to a separate folder

When I try to execute the file SQLCLRSP1.vbproj  I get an error saying that it cannot locate a database linked to the project.  I'm still quite new at this and I'm not sure how to attatch the database file.
0
 
JaneRogersAuthor Commented:
...another thing, I don't see any forms in the project- did I miss them??
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
MacNuttinCommented:
The sample database from Microsoft in SQl2005 products is now called "Adventure Works" and it's a much more realistic db than "Northwind" was. Get everything you need here:
http://www.microsoft.com/downloads/details.aspx?FamilyId=E719ECF7-9F46-4312-AF89-6AD8702E4E6E&displaylang=en
0
 
JaneRogersAuthor Commented:
Hi MacNuttin,

I've already tried the link you suggested here's what happened ...

Downloaded the file 'AdventureWorksBI.msi'

Installed the package.

Went to the installation folder and double-clicked the file 'AdventureWorks.sln'

There was the following message:

The application for project 'C:\ ... \Adventrue Works DW Standard Edition.dwproj' is not installed.

Make sure the application for the project type (.dwproj) is installed.

Two questions...

1 - What is the next step to get this working??

2 - As I mentioned in the question, I need an example of accessing data in a SQL server database using vb.net- is this a vb.net project??

Keep your suggestions coming!




0
 
MacNuttinCommented:
Did you install a SQL 2005 database? Desktop vesion is here:

http://msdn.microsoft.com/vstudio/express/sql/download/
0
 
JaneRogersAuthor Commented:

SQL 2005 *is* installed

I'll re-install and try again.
0
 
MacNuttinCommented:
Can you see the SQL2005 instance with ODBC or any tool that makes a connection to the SQL2005 instance?
0
 
JaneRogersAuthor Commented:
I've been on holiday- sorry for not replying sooner!

In the Server Explorer I can connect to a SQL 2005 database, is that what you meant??
0
 
MacNuttinCommented:
That's good but no, Do you know about control panel-->admistrative Tools-->data sources(ODBC) Do you know how to set and test a connection to your database?

You need to configure your VS project to connect with a connection string. There is a wizard for doing this and LOTS of instructions tutorials examples in the help of VS.

I'm guessing that Adventure Works didn't install because it was looking for the standard edition of SQL2005 not the express? In any case you can accomplish your goal of "I need an example of accessing data in a SQL server database using vb.net" by sending this query(SELECT Name FROM master..sysdatabases) in VS and returning the record set
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now