473,480 Members | 1,918 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Read Access DB

hi
any one can tell me how can i Read Access Data base Using C#.net
windows
which refrence i hav to use , ConnectionString , reader
and all
actualy i want to append DAta from Access (Pickup.mdb) File to SQL
SERVER
i dont know how can i connect to access db through C#.net
Help me out
Regards
Smile

Mar 26 '06 #1
3 5143
h

Mar 26 '06 #2
using System.Data.OleDb;
using System.Data;

private System.Data.OleDb.OleDbConnection dbconnection;
private OleDbCommand command;
String databaseConnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=c:\\ffa.mdb;Persist Security Info=False";

dbconnection = new OleDbConnection(databaseConnection);
dbconnection.Open();
public DataSet GetEmp()
{
dbconnection = new OleDbConnection(databaseConnection);
dbconnection.Open();
OleDbDataAdapter da = new OleDbDataAdapter("SELECT * FROM emp",
databaseConnection);
DataSet ds = new DataSet();
da.Fill(ds, "emp");

return ds;
}

Mar 26 '06 #3
Hi

using System.Data.Odbc;

OdbcConnection con = new OdbcConnection("<connection
string>");
OdbcCommand com = new OdbcCommand("select * from TableX",
con);
OdbcDataAdapter da = new OdbcDataAdapter(com);
DataSet ds = new DataSet();

da.Fill(ds,"New");

DataGrid dg = new DataGrid();
dg.DataSource = ds.Tables["New"];


you can get the connection string from:
http://www.connectionstrings.com/

Mar 26 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
1542
by: Markus Kemp | last post by:
Hi all, Well, basically the title says it all. I can't use os.access() because it tests whether the REAL UID can read/write/exec the file. Surely there has to be a function that does what I...
0
1319
by: Jennie | last post by:
How much space is required for a reorg of all indexes on a table using the 'ALLOW READ ACCESS' option? I assume this would be equivalent to the largest individual index. I attempted a reorg with...
3
4276
by: Prince Kumar | last post by:
When running LOAD with "ALLOW READ ACCESS", I get the following error if select is running againt the table (isolation UR). load.sql --------- db2 load from /u02/data/dly_d040817_test.dat of...
2
1836
by: Rob | last post by:
Apologies if this is a frequently asked question but i haven't been able to find a satsifactory answer anywhere else at the moment. My problem is that i'm trying to convert an Access97 database...
2
1492
by: Raed Sawalha | last post by:
Hi all, I need a function which will return read access for the current user as true or false when a file path is passed to it (either local or UNC share). My web-config file is using windows...
5
13233
by: Mitchell S. Honnert | last post by:
Is there a way, given the full path of a folder on a network, that one can programatically tell if you have Read access to that folder? I have an application where the user is able to select a...
1
1738
by: Paul M | last post by:
Hello, I want to to be able to read line by line the contents (ie the html) inside some Data Access Pages I have in a Microsoft Access database. There doesnt seem to be a call I can use in the...
4
4025
by: Bit byte | last post by:
I have a structure defined like this: struct foo { unsigned int magic ; void *mydata ; };
3
16406
sujithkrishnan
by: sujithkrishnan | last post by:
hi all... please help me in resolving this error.. i created a web service and i am not able to consume it in my app. When i browse that page am gettin an ERROR as follows.. Exception...
0
7037
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
1
6730
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
6873
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4767
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4471
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
2990
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
2976
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1294
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
558
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.