Visual Basic .NET Forums  

Go Back   Visual Basic .NET Forums > VB.NET > Winforms Data Access

Winforms Data Access VB.NET development for data access and back-end related areas

VB.NET Forums Newsletter Signup:
Email address:


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-02-2008, 12:48 AM
VB.NET Forum Newbie
.NET Framework: .NET 3.0 (VS 2005/2008)
 
Join Date: Nov 2008
Location: Singapore
Posts: 18
Reputation: 10
reubenfoo is on a distinguished programming path ahead
Default Excel - SQL - Forms

Hi All,


May i know how do i put an excel file into a SQL database in VB.NET.

After a button is clicked, the information from the excel file would be extracted from the SQL database and the information on the windows form.

For the windows form, how do I, for every set of data put a checkbox beside it? using coding

Thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 12-02-2008, 9:49 AM
cjard's Avatar
VB.NET Forum All-Mighty
.NET Framework: .NET 2.0 (VS 2005)
 
Join Date: Apr 2006
Age: 65
Posts: 6,137
Reputation: 658
cjard has a reputation beyond reputecjard has a reputation beyond reputecjard has a reputation beyond reputecjard has a reputation beyond reputecjard has a reputation beyond reputecjard has a reputation beyond reputecjard has a reputation beyond reputecjard has a reputation beyond reputecjard has a reputation beyond reputecjard has a reputation beyond reputecjard has a reputation beyond repute
Default

Can you ask your questions in a way that makes sense?

compare:
>excel file into a SQL database

vs:
>excel file would be extracted from the SQL database

"FROM" and "INTO" are opposites in this context
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 12-02-2008, 7:24 PM
VB.NET Forum Newbie
.NET Framework: .NET 3.0 (VS 2005/2008)
 
Join Date: Nov 2008
Location: Singapore
Posts: 18
Reputation: 10
reubenfoo is on a distinguished programming path ahead
Default

import the excel file into the database and then extract it out

its like,

Step 1: A user selects an excel file

Step 2: The excel file is being imported in to the database

Step 3: The contents in the file is being extracted for viewing and editing on the form.

Step 4: Once confirmed, the output file would be in text format
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 12-03-2008, 7:52 AM
cjard's Avatar
VB.NET Forum All-Mighty
.NET Framework: .NET 2.0 (VS 2005)
 
Join Date: Apr 2006
Age: 65
Posts: 6,137
Reputation: 658
cjard has a reputation beyond reputecjard has a reputation beyond reputecjard has a reputation beyond reputecjard has a reputation beyond reputecjard has a reputation beyond reputecjard has a reputation beyond reputecjard has a reputation beyond reputecjard has a reputation beyond reputecjard has a reputation beyond reputecjard has a reputation beyond reputecjard has a reputation beyond repute
Default

Confusing. Anyway:

ConnectionStrings.com - Forgot that connection string? You will find it right here! - get a conn str for your excel file, read it with the MS Access DB Driver

Read into a weakly typed datatable

Transfer into another strongly typed datatable you made, linked with the database. FOllow the instructions in the DW2 link in my signature, section Creating a Simple Data App for more info

No need to d/l from the db because you already have all the info in the strongly typed datatable

Write the datatable to a file
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 12-04-2008, 12:52 AM
VB.NET Forum Newbie
.NET Framework: .NET 3.0 (VS 2005/2008)
 
Join Date: Nov 2008
Location: Singapore
Posts: 18
Reputation: 10
reubenfoo is on a distinguished programming path ahead
Default

I've attached the excel and access screenshots.

coding to put an excel file data into a MS access table?

The table name would be "apciti"

The field names are... PMCO, PMLOC, PMIPMT, PMEPMT, PMEDOC, PMCURI, PYORPM, PYDATE, PMVNCD, VENNAM, VADR1, VADR2, VADR3, PMORPT, PMPMTT, PMPSLN, PMDOCT, PMACDT, PMCRDT, PMCRTT, PMCROP. Primary Key would be APCITID - auto gen with increment of 1

All contents are in the excel file.


SOrry for the changes.. The user suddenly changed the requirements
Attached Images
File Type: png exceldata.png (22.6 KB, 1 views)
File Type: png accessdata.png (6.2 KB, 1 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 12-04-2008, 6:53 AM
cjard's Avatar
VB.NET Forum All-Mighty
.NET Framework: .NET 2.0 (VS 2005)
 
Join Date: Apr 2006
Age: 65
Posts: 6,137
Reputation: 658
cjard has a reputation beyond reputecjard has a reputation beyond reputecjard has a reputation beyond reputecjard has a reputation beyond reputecjard has a reputation beyond reputecjard has a reputation beyond reputecjard has a reputation beyond reputecjard has a reputation beyond reputecjard has a reputation beyond reputecjard has a reputation beyond reputecjard has a reputation beyond repute
Default

Er. Last time I checked, I wasn't being paid to develop your application. If you want to alter this situation, let me know via PM
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





All times are GMT -4. The time now is 5:07 PM.

Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0


For advertising opportunities click here.