473,506 Members | 17,266 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem with importing a CSV into database

1 New Member
Hi,

Presenlty Iam facing problem while trying to import a .csv file into the database.
Issue is that... I am able to achieve my functionality when i import a file from D:\
But when i run the same program... and try to import from C:\ its throwing an exception.

I am coding in VB (Visual Studio 2005 ) and database is Microsoft SQL SERVER 2005.
My project is currently running on local machine in C:\Inetpub\wwwroot

Im using the following code to query the database...

SELECT employeeid, IDCubeID, ClockTime, ClockType, CreatedDate, Status, EntryType, ' ' as Remark,YardID,YardName,' ' as UserModify,' ' as UserCreate,DateModify,JobNo FROM & File1.PostedFile.FileName.ToString

where File1.PostedFile.FileName.ToString = D:\RawData_ClockTime.csv

when i import from C drive .. (File1.PostedFile.FileName.ToString = C:\RawData_ClockTime.csv)
it is throwing an exception as follows...


The Microsoft Jet database engine could not find the object 'RawData_ClockTime.csv'. Make sure the object exists and that you spell its name and the path name correctly.
Nov 9 '07 #1
1 1466
iburyak
1,017 Recognized Expert Top Contributor
Always remember that C: drive on your local machine and on your server is not the same.

Use \\machine_name\..... instead.

Good Luck.
Nov 9 '07 #2

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

Similar topics

2
8688
by: Andreas Emmert | last post by:
Hi there, I'm trying to import a csv file into my MySQL database. Unfortunately the number format for the price column is formatted in German style, i.e. XX,XX (decimals separated by comma not...
9
4016
by: Edward S | last post by:
I budget for a Project in an Excel sheet as illustrated below. The months below are usually a 2 year period i.e. 24 months, though it could be over 24 months depending upon a Project. I then...
1
3649
by: sparks | last post by:
I have never done this and wanted to ask people who have what is the best way. One person said import it to excel, then import it into access table. but since this will be done a lot, I am...
7
3030
by: Darren | last post by:
I have been attempting to create a reservation planning form in excel that imports Data from an Access database and inserts that information automaticly into the correct spreed sheet and the...
14
1866
by: MLH | last post by:
GHudson has working procedures posted at http://www.access-programmers.co.uk/forums/showthread.php?t=66320 They work. Relationships, however, and some minor default settings are not preserved....
2
3159
by: Snozz | last post by:
The short of it: If you needed to import a CSV file of a certain structure on a regular basis(say 32 csv files, each to one a table in 32 databases), what would be your first instinct on how to...
29
5467
by: wizofaus | last post by:
I previously posted about a problem where it seemed that changing the case of the word "BY" in a SELECT query was causing it to run much much faster. Now I've hit the same thing again, where...
2
1184
by: John | last post by:
Hi I have a vs2003 database app that use non-bound infragistics controls and all the plumbing is done in code. This works fine in vs2005. After importing to vs2005 via the built-in...
1
1885
by: Phil | last post by:
I want to add a button to a form to import a text delimited file. The File is delimited by "^" and so I have created a specification file by manually impoting the text file, using the advanced...
1
1355
by: rohitsingh0000 | last post by:
hi, i want to import the tables of a oracle database into the sql database.but i am getting errors importing some tables with certain coulms.so far as i got the problem is that a column named D_O_B...
0
7220
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
7308
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
7371
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...
0
7479
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5037
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
4702
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1534
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
757
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
410
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.