|
-
Apr 4th, 2006, 06:38 AM
#1
Thread Starter
Fanatic Member
[RESOLVED] Passing data from excel to access
Hello everyone,
I know how to read from excel..and how to insert into access database.
But it just doesnt work that easy for me.
I have some 10 columns in the excel sheet...
and I have 5 columns in the access database.
I want to just insert certain selected 5 columns into the access database...
Please help me with this someone..
Thanks
Godwin
Help someone else with what someone helped you! 
-
Apr 4th, 2006, 06:40 AM
#2
Thread Starter
Fanatic Member
Re: Passing data from excel to access
I have a really really long code Ive tried...Its using the oledbreader,command,etc...I retrieved the data into a hashtable and tried inserting into access db.But,well it fails very very horribly.Please help me,Thanks.
Godwin
Help someone else with what someone helped you! 
-
Apr 4th, 2006, 06:47 AM
#3
Re: Passing data from excel to access
You can just use ADO.NET. One OleDbDataAdapter and two OleDbConnections. The SelectCommand has a connection to Excel and the InsertCommand has a connection to Access. Set the AcceptChangesDuringFill property of the adapter to False. Write you SQL to retrieve and then insert the data, then call Fill to populate a DataTable and Update to save it to Access.
-
Apr 5th, 2006, 07:45 AM
#4
Thread Starter
Fanatic Member
Re: Passing data from excel to access
Thanks Jm,
Thats Exactly what I did and it gave me errors..It was because of my careless programming...
Thanks
Godwin
Help someone else with what someone helped you! 
-
Apr 7th, 2006, 04:40 AM
#5
Thread Starter
Fanatic Member
Re: [RESOLVED] Passing data from excel to access
Forgot to mark this as resolved..Did it now
Godwin
Help someone else with what someone helped you! 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|