473,663 Members | 2,705 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\wwwr oot

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

SELECT employeeid, IDCubeID, ClockTime, ClockType, CreatedDate, Status, EntryType, ' ' as Remark,YardID,Y ardName,' ' as UserModify,' ' as UserCreate,Date Modify,JobNo FROM & File1.PostedFil e.FileName.ToSt ring

where File1.PostedFil e.FileName.ToSt ring = D:\RawData_Cloc kTime.csv

when i import from C drive .. (File1.PostedFi le.FileName.ToS tring = C:\RawData_Cloc kTime.csv)
it is throwing an exception as follows...


The Microsoft Jet database engine could not find the object 'RawData_ClockT ime.csv'. Make sure the object exists and that you spell its name and the path name correctly.
Nov 9 '07 #1
1 1480
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
8701
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 by dot). When importing this file using LOAD DATA LOCAL INFILE the decimals are cut off. I'm using column type FLOAT for the price column in my database. Is there any chance to preserve the decimals when importing the csv file into my database...
9
4030
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 need to input this in an Access database, where I do a comparison with the Actual cost. The table “TblBudget” in Access is made of 4 fields, namely: (1) CostElement (2) CostCenter (3) Month (4) Amount$. At the moment this method is very cumbersome....
1
3670
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 trying to avoid this extra step. can access read in this file directly into a table as append data? thank you very much for any pointers
7
3054
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 correct cells within that worksheet. The Excel Book is made up of 12 worksheets named Jan-Dec. Each worksheet has columns labeled as each day of that month. Column 'A' is reserved for 19 rows named "room1 - room19". The data I am importing from the...
14
1882
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. Reestablishing some default settings and settings is a small price to pay for a set of text files that may save your database from total loss #AND# seem to remove the database bloat as well. I was wondering if someone knew how to preserve the...
2
3170
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 set this up so as to do it reliably and minimize overhead? There are currently no constraints on the destination table. Assume the user or some configuration specifies the database name, server name, and filename+fullpath. The server is SQL...
29
5497
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 basically almost any change I make to how the query is executed (so that it still performs the same function) causes the performance to jump from a dismal 7 or 8 seconds to instantaneous. It's a very simple query of the form: SELECT Min(MyValue)...
2
1199
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 conversion wizard the application doe snot show any data instead all fields display the test 'System.Data.DataRowView'. Could someone give me a hint on what could be the problem and how to fix it?
1
1894
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 button and saving the specification. Naively I thought I just needed to add the specification file name to variable strSpec for the following command to work DoCmd.TransferText acImportDelim, strSpec, strOutFile, strInFile, -1
1
1366
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 in the oracle database table having datatype date ,while its creating problem transfoming in to datetime in sql,as there is not any other type for dates.so plss help me,as i cant understand this problem.The error is ilke this--- Error at...
0
8435
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8345
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8857
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8768
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8633
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
4181
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2763
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 we have to send another system
2
1999
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1754
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.