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

Can I develop Database Applications with the Standard Version of Visua

Status
Not open for further replies.

piscis

Programmer
Jun 26, 2003
29
PR
Gentleman:

Can I develop Database Applications with the Standard Version of Visual Basic.Net 2003?

Every time that I try to open a sample database application that includes an Access Database I get the error shown below, I tried 10 different projects and get the same error.

“Object Reference not set to an instance of an Object”

Could you please tell me if it is a MUST to install SQL or any other file?

I’m Using;
Visual Basic.Net Standard Edition 2003
Windows XP Home Edition
Microsoft Access 2000

Thanks
 
What object is it referring to? If you can give more details, there may be a solution; but based on that error message, it could literally be anything.

Ben
 
benlinkknilneb:

When I double click the error it takes me to this line:

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
OleDbDataAdapter1.Fill(DataSet11)
End Sub
End Class

Do you know why?

Andy
 
OleDbDataAdapter1.Fill(DataSet11) is the offending line?

One of those two objects (OleDbDataAdapter1 or DataSet11) has not been declared with the "new" operator. This is done automatically if you use the wizards to create them; although it IS possible to declare them manually. I'm guessing that this is just a typo: DataSet11 probably should be DataSet1. See if that fixes it; if not, the problem is a little more complicated, but most certainly solve-able.
 
benlinkknilneb:

The problem seem to be with my computer not having the MSDE engine, I downloaded the

MSDE 2000 for Developers Using Visual Studio .NET

When installing I got this message:

A strong SA password is required for security reasons.
Please use SAPWD switch to supply the same. Refer to
readme for more details. Setup will now exit.

What is SAPWD and what should I do?

Andy

 
Whoa, where did you come up with that? I'm not sure I followed the chain of events since my last post. The error you got was when you tried to run a sample program that came included with VB.NET, right? The error you posted originally said that you hadn't initialized a variable. Your code used an OLEDB adapter, so it's not a SQL Server example. If they gave you the database in the sample file, then everything should be good to go.

What gave you the idea that it was related to MSDE? Everything you need should have been in the VB.NET package.

Ben
 
I got the idea after trying opening 10 different projects and not being able to run a single one. This morning I downloaded a sample Access database project (can I email it to you?) and could not run it.

There must be something else beside variable declaration. Could you please take a look?

Thanks

Andy
 
benlinkknilneb (Programmer):

I found this on my computer on the MSDE folder:

Visual Studio .NET 2003 does not include Microsoft SQL Server Desktop Engine (MSDE). To download MSDE, go to
This is the path:

C:\Program Files\Microsoft Visual Studio .NET 2003\Setup\MSDE\msde_readme.htm

What do you think?

Andy
 
Hmm... The projects you're trying to run may use SQL Server connections instead of Access Connections. It doesn't make sense, because SQL Server has its own brand of DataAdapter object. Did they include the database with the project? If so, then you need to go into the project and check to make sure it's finding the right path. If not, then I guess they're assuming you've installed MSDE. You might try reinstalling VB.NET and see if there's a selection to install it that way. I never encountered this before, because our plant got SQL Server 2000 Developers' Edition with VS.NET. I don't see why you'd need that to use Access Databases though.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top