SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


file name in OPENDATASOURCE()


file name in OPENDATASOURCE()

Author
Message
Jignesh Patel-441242
Jignesh Patel-441242
Grasshopper
Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)

Group: General Forum Members
Points: 21 Visits: 28
Hello,

I may be asking silly question!

I am using SQL Server 2005 Standard Edition (SP2).

I ran query using OPENDATASOURCE(). I am using tab delimited text file as "Data Source". I got following SQL exception when I ran query with "ParthaMishra_1172_Sov_ITMSUpload_UnitedWay_NewEngland_2009Final.txt" file name.
------Exception-----
Exception in Thread com.microsoft.sqlserver.jdbc.SQLServerException: The OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)" does not contain the table "ParthaMishra_1172_Sov_ITMSUpload_UnitedWay_NewEngland_2009Final#txt". The table either does not exist or the current user does not have permissions on that table.
---------------------

Interestingly, I ran the query again after changing name of the file to "PPM_ITMSUpload_1172.txt" and it worked.

So my question is: Is there anything with length of file name when using OPENDATASOURCE()?

The physical paths of the file are "E:\PMS\UploadedFiles\23055\2008\emp_CBD6042EEB20D1B68E1A51F194B024BD_1221156673057\ParthaMishra_1172_Sov_ITMSUpload_UnitedWay_NewEngland_2009Final.txt" and "E:\PMS\UploadedFiles\23055\2008\emp_CBD6042EEB20D1B68E1A51F194B024BD_1221157087084\PPM_ITMSUpload_1172.txt"

Please clarify me.

Thank you!
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search