473,320 Members | 1,950 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,320 software developers and data experts.

query that uses datatable and Access table

VMI
I have a datatable with emplcodes and I need to extract, from my Access
table, all records that contain an emplcode included in my datatable. In
other words, I need to do a query that accesses a datatable and an access
table. How can this be done? I can't load the Access table into a datatable;
it's too much data.

Thanks.
Nov 16 '05 #1
2 1997
VMI wrote:
I have a datatable with emplcodes and I need to extract, from my Access
table, all records that contain an emplcode included in my datatable. In
other words, I need to do a query that accesses a datatable and an access
table. How can this be done? I can't load the Access table into a datatable;
it's too much data.

Thanks.


When you say "database" do you mean a production db like MS SQL db or
Oracle?

Then, as i understand, you have an Access db and an <whatever>SQL db, right?
And if i understood correctly you need to query a <whatever>SQL db to
get a list of emplcode's and to returnall records from Access db which
have those emplcode's.

What i would do is maybe a dirty methhod but it works in my mixed
environment, so it might as well work in yours.

1. Link your <whatever>SQL table to your Access database, as linked table.

2. Create an Access query which will perform what you need.

3. Call this query as a stored proc from C#, after you create a
SQLConnection to the Access db.

It should work fine.

Let me know if you need any addt'l help,

Andrey
Nov 16 '05 #2
VMI

Use in your select clause a WHERE with a parameter something as

Select * from mytable WHERE emplcode = @emplcode

And use than an oledbparameter
http://msdn.microsoft.com/library/de...classtopic.asp

I hope this helps

Cor

"VMI" <vo******@yahoo.com>
...
I have a datatable with emplcodes and I need to extract, from my Access
table, all records that contain an emplcode included in my datatable. In
other words, I need to do a query that accesses a datatable and an access
table. How can this be done? I can't load the Access table into a
datatable; it's too much data.

Thanks.

Nov 16 '05 #3

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

Similar topics

3
by: JC Mugs | last post by:
Help needed for project-Access 2002(office xp) PROBLEM: Figuring out how to lookup a record and DDate field in Table1 - Take that DDate-field data from record looked up and assign it to Date...
6
by: kevin carter | last post by:
hi i have a table conataining several fields one of which is date i want to be able to search the table on the date field using code. the code below generates the query from a form, however i get...
4
by: Brian | last post by:
I hope this will make sense. I'm trying to filter the records in a table based on records in a 2nd table. The trick is, I can't use a query. I'm trying to filter down the number of records going...
1
by: VMI | last post by:
I need to display Access data in a datagrid but the Access table has over 2 million records. Since I can't fill a datatable with all those records but the user needs to see all of them, how can I...
1
by: cindy | last post by:
Get data into datatable, add to dataset dsSearch " Get data into datatable, add to dataset dsSearch Using In-Memory SQL Engine join the tables and select the filenames from the join, add to...
0
by: JC Voon | last post by:
Hi All: I'm new in Threading and Web Services, can someone please verify my code, i'm not sure whether this is the correct way, althought it is partially work, but some time it will raise...
4
by: Cylix | last post by:
I am using vs2003, How can I do the job like select studentID from student where studentName='Jay' Do I need to iterate the datatable of the dataset row by row? Or I can query it?
3
by: Oenone | last post by:
I have a project that creates a SqlDataAdapter and uses its Fill method to fill a DataTable with data from a user-provided query. From there I can obviously access details about the rows and...
11
by: lenygold via DBMonster.com | last post by:
Hi everybody! This query is supposed to count consecutive years from the current year without OLAP. Input Table: ID DateCol 1 02/01/2006 1 01/01/2006 1 01/01/2005
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.