By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,679 Members | 2,787 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,679 IT Pros & Developers. It's quick & easy.

microsoft access driver problems

P: n/a
hey,

ive been trying to set up a web form in visual basic.net that can
access a microsoft access database. i need to use odbc also. i can get
it working using a windows form but not a web form. might be that ive
set up the database wrong using the odbc data source administrator?

i get an error saying that it cant find the data source, when i put in
the following line of code in my webform.aspx.vb file:
"OdbcDataAdapter1.Fill(DataSet11)"

Can anyone tell me exactly how to go about setting up my access
database using odbc data source administrator, and what exactly i need
in my connection string? the end program is supposed to be an on-line
booking system. should i use a File DSN, or a System DSN?

Feb 17 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
> ive been trying to set up a web form in visual basic.net that can
access a microsoft access database. i need to use odbc also. i can get
it working using a windows form but not a web form. might be that ive
set up the database wrong using the odbc data source administrator?
First of all, I have to question your assertion the "i need to use odbc."
ODBC is really almost obsolete. It is/was a wrapper for OLE DB, but now you
can use OLE DB directly with a large variety of (almost any) data sources,
including Access/Jet. It will perform much better for you, and you don't
need a DSN at all, just a Connection String. Here's a sample OLE DB
Connection String for Access (using standard security, and compliments of
http://www.connectionstrings.com):

Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\somepath\mydb.mdb;User
Id=admin;Password=;

Note that the Connection String contains all the information you would need
to put into a DSN. But you don't have the external dependency upon a DSN, or
the headache of having to create/maintain a DSN.

You would use the .Net System.Data.OleDb Namespace and related classes,
which are almost exactly the same as the ODBC and other provider namespace
classes, such as OleDbCommand, OleDbConnection, OleDbDataAdapter, etc.

Try it out, and see if it doesn't make your life easier. Here's a link to a
good MSDN article about creating your Connection:

http://msdn.microsoft.com/library/de...ssdatabase.asp

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
To a tea you esteem
a hurting back as a wallet.

<so*******@yahoo.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com... hey,

ive been trying to set up a web form in visual basic.net that can
access a microsoft access database. i need to use odbc also. i can get
it working using a windows form but not a web form. might be that ive
set up the database wrong using the odbc data source administrator?

i get an error saying that it cant find the data source, when i put in
the following line of code in my webform.aspx.vb file:
"OdbcDataAdapter1.Fill(DataSet11)"

Can anyone tell me exactly how to go about setting up my access
database using odbc data source administrator, and what exactly i need
in my connection string? the end program is supposed to be an on-line
booking system. should i use a File DSN, or a System DSN?

Feb 17 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Browse more ASP.NET Questions on Bytes