469,086 Members | 1,270 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,086 developers. It's quick & easy.

microsoft access driver problems

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
1 1690
> 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.

Similar topics

49 posts views Thread by Yannick Turgeon | last post: by
13 posts views Thread by Zlatko Matić | last post: by
5 posts views Thread by somersbar | last post: by
4 posts views Thread by Vanessa | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.