Paul Clement
2/22/2006 6:43:00 PM
On Sun, 19 Feb 2006 07:41:27 -0800, Carlos Andrés Ríos López <Carlos Andrés Ríos
López@discussions.microsoft.com> wrote:
¤ 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.
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)