Excel - SQL - Forms

reubenfoo

Member
Joined
Nov 25, 2008
Messages
18
Location
Singapore
Programming Experience
Beginner
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
 
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
 
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
 
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
 
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
 

Attachments

  • exceldata.png
    exceldata.png
    22.6 KB · Views: 23
  • accessdata.png
    accessdata.png
    6.2 KB · Views: 24
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
 

Latest posts

Back
Top