[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.odbcnet

On the edge of commiting suicide

Carlos Andrés Ríos López

2/19/2006 3:41:00 PM

Hi

I'm developing a Web application using VWD Express Edition, and trying to
load a text commaseparated set of records into an SqlServer 2005 Expr Edit
table in execution time. The problem arises when trying to establish a
connection through odbc to a texfile, as I think it's the most structured way
to access records from a plain text file. I always get this error: ERROR
[HY000] [Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database
engine cannot open the file '(unknown)'. It is already opened exclusively by
another user, or you need permission to view its data. The statements in my
code are:

Dim connection_String As String =
ConfigurationManager.ConnectionStrings("ConnectionString_plano").ConnectionString
Dim strDestination As String =
ConfigurationManager.ConnectionStrings("ConnectionString").ConnectionString
Dim conn As New Data.Odbc.OdbcConnection(connection_string)
Dim cmdCustomer As New Data.Odbc.OdbcCommand("select * from
or_tbl_saldos", conn)
conn.Open()
Dim drCustomer As Data.Odbc.OdbcDataReader =
cmdCustomer.ExecuteReader()

This last one is the instruction breaking it all!! before trying to invoke
SqlBulkCopy

I've tried everithing:

Permissions: I've given the file and entire folder containing the file,
permissions for everyone, every existing user to everything, even aspnet user.

Curiously in desing time I can see the table from text file without
complications.

I suspect the ASP .NET Developement Server(standalone version for testing)
could be the source of this problem.

Has anyone dealed succesfully with this problem?

I'm starting to stress to much. I'm stuck!!

BTW, is there any better way to programmatically load tables in ASP 2.0 from
text files.

Any help will be appreciated

Greetings from Colombia Latinoamerica



1 Answer

Paul Clement

2/22/2006 6:43:00 PM

0

On Sun, 19 Feb 2006 07:41:27 -0800, Carlos Andr&#233;s R&#237;os L&#243;pez <Carlos Andr&#233;s R&#237;os
L&#243;pez@discussions.microsoft.com> wrote:

&#164; Hi
&#164;
&#164; I''m developing a Web application using VWD Express Edition, and trying to
&#164; load a text commaseparated set of records into an SqlServer 2005 Expr Edit
&#164; table in execution time. The problem arises when trying to establish a
&#164; connection through odbc to a texfile, as I think it''s the most structured way
&#164; to access records from a plain text file. I always get this error: ERROR
&#164; [HY000] [Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database
&#164; engine cannot open the file ''(unknown)''. It is already opened exclusively by
&#164; another user, or you need permission to view its data. The statements in my
&#164; code are:
&#164;
&#164; Dim connection_String As String =
&#164; ConfigurationManager.ConnectionStrings("ConnectionString_plano").ConnectionString
&#164; Dim strDestination As String =
&#164; ConfigurationManager.ConnectionStrings("ConnectionString").ConnectionString
&#164; Dim conn As New Data.Odbc.OdbcConnection(connection_string)
&#164; Dim cmdCustomer As New Data.Odbc.OdbcCommand("select * from
&#164; or_tbl_saldos", conn)
&#164; conn.Open()
&#164; Dim drCustomer As Data.Odbc.OdbcDataReader =
&#164; cmdCustomer.ExecuteReader()
&#164;
&#164; This last one is the instruction breaking it all!! before trying to invoke
&#164; SqlBulkCopy
&#164;
&#164; I''ve tried everithing:
&#164;
&#164; Permissions: I''ve given the file and entire folder containing the file,
&#164; permissions for everyone, every existing user to everything, even aspnet user.
&#164;
&#164; Curiously in desing time I can see the table from text file without
&#164; complications.
&#164;
&#164; I suspect the ASP .NET Developement Server(standalone version for testing)
&#164; could be the source of this problem.
&#164;
&#164; Has anyone dealed succesfully with this problem?
&#164;
&#164; I''m starting to stress to much. I''m stuck!!
&#164;
&#164; BTW, is there any better way to programmatically load tables in ASP 2.0 from
&#164; text files.

What authentication are you using for the web application? Anonymous? Basic? Integrated NT?

Is the app configured for impersonation?

Is this text file located on the web server or a remote server?


Paul
~~~~
Microsoft MVP (Visual Basic)