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

Excel File to MsSql by VB6

Pls can some one give me the code

I have a CurrentData.Xls file to be copied to a data base though mssql can some one giveme the code

I have a Database Name Medicine

CurrentData.xls have 10 Cols and around 2500 Rows how can i copy the excel file into dbf file in the Medicine Database pls give me the query and code

urgent
Oct 12 '06 #1
1 1275
LacrosseB0ss
113 100+
I have done something similar using Excel Objects but the Database was an Access database. Unfortunately, there is a lot of nested For Loops and such using Worksheet.Cells(row, col).Value. It gets very tedious but it can be done.

It has been a while for me since using Excel Objects. I know there's also a few references to add (which slip my mind, they're obvious when you see them). Then it's xl = new Application.Excel will create the object. I apologize I cannot provide more code but, as I say, it's been a while. Off the top of my head I do not remember.

As for the database side, I had used an ODBC and connected to that through VB. You will need probably a global variable for a connection string containing database name and user/password (if required).

I apologize I cannot provide exact code references. Hopefully this is enough to at least make a start. It has been a while for me, maybe someone else can also help. Sorry again!
Oct 12 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Ilan | last post by:
Hi all I need to add data from two Excel sheets (both on the same workbook) to an existing table in my SQL DB. The problem is that each sheet holds different fields for the same record, though...
1
by: dlakme | last post by:
Hi, I tried to add column headers and delete all rows to excel database which is a linked server to my sql server db. I got an error message, "delete data through linked server is not...
8
by: Kemal Taskin | last post by:
Hi all, this question should go to excel newsgroup however it is related to .NET also. anyway.. In a web page written with C# I read excel files and store them into a table in an MSSQL Server...
2
by: Paul | last post by:
Hi just wondering if anyone has tried to read in an excel file into a web application? I have a web app that I want to be able to update records in an mssql database and use an excel file for data...
1
by: Muskito | last post by:
HELP!!! Hello All, I'm using VB.net 2003 and trying to update data in Excel worksheet. The program selects data from the excel, updates something in the MSSQL DB and then tries to update...
9
by: dba123 | last post by:
I need some help and direction on what classes and an example or two (article) on how to read an Excel Worksheet and insert one column into a database table column. I am using .NET 2.0 only. What...
4
by: fdeasy | last post by:
Hi All, I'm having problem with import excel into MsSQL automatically, i knew that we can import the file manually from MsSQL. However, i want it to run automatically. is it possible? I've heard...
1
by: laredotornado | last post by:
Hi, I'm using PHP 4.4.4 on Apache 2 on Fedora Core 5. PHP was installed using Apache's apxs and the php library was installed to /usr/local/php. However, when I set my "error_reporting"...
1
by: Darrenovic | last post by:
Hi, I'm using Vista and i have some issue that i need to know in order to do it efficiently in Ms SQL server 2008. I have an excel/word file with all the tables name in a column along their...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.