473,385 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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 1933
> 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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Douglas Bell | last post by:
i get this error sometimes when accessing the database throug my web brouser Driver={Microsoft Access Driver (*.mdb)};DBQ=C:\Inetpub\wwwroot\fpdb\asplogin.mdb; what can i do to fix it it...
49
by: Yannick Turgeon | last post by:
Hello, We are in the process of examining our current main application. We have to do some major changes and, in the process, are questionning/validating the use of MS Access as front-end. The...
13
by: Zlatko Matić | last post by:
Is it possible to use Access as front-end for POstgreSQL and how ? What about Access Projects (.adp) and PostgreSQL ?
8
by: Dakkar | last post by:
I wrote a program with c# for connecting mysql and taking data from it but when someone without me try to execute the program they are taking this error ERROR Data source name not found and...
4
by: cipher | last post by:
Hello, I'm creating a webservice that needs to query an Access database (mdb). Here's my code: OdbcConnection *pConnection = new OdbcConnection("Driver={Microsoft Access Driver...
5
by: somersbar | last post by:
hello all, im trying to connect to a microsoft access database from an ASP.NET web form. i keep getting the following error though: ERROR Could not use '(unknown)'; file already in use....
0
by: bazzer | last post by:
hey, i am using visual basic.net 2003 and have an ASP.NET webform application thats accessing a microsoft access 2003 database. i kept getting the following error when i tried to run it: ERROR ...
0
by: bazzer | last post by:
hey, im trying to access a microsoft access database from an ASP.NET web application in visual basic 2003.NET. i get the following error when i try running it: Server Error in...
4
by: Vanessa | last post by:
Hi there I am an Access developer, and I have written applications for a 30 telephone call center, using the standard multiuser jet engine, it all works fine, but I want to move our systems onto...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.