944,140 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 10254
  • C++ RSS
Sep 22nd, 2005
0

Export Data From Excel to ASP and SQL Server

Expand Post »
I copied book1.xls into IISServer c:/inetpup/wwwroot

objConn.Open "Driver={Microsoft Excel Driver (*.xls)};DriverId=790;DBQ=" & Server.mappath("/book1.xls") &";ReadOnly= true ; UID=admin;"

Dim strSQL
excelfilename = "Book1.xls"

strSQL = "select * from " & excelfilename

Dim objRS
Set objRS = Server.CreateObject ("ADODB.RecordSet")
objRS.Open strSQL, objConn,3,3

When I execute the page

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E21)
ODBC driver does not support the requested properties.

Please help me

Regards
Chandrakumar
chandrakumar@dzinegarage.com
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Chandrakumar is offline Offline
2 posts
since Sep 2005
Sep 22nd, 2005
0

Re: Export Data From Excel to ASP and SQL Server

That's Visual Basic, not C or C++. Please direct your question to a more appropriate forum.
Administrator
Reputation Points: 6442
Solved Threads: 1393
Bad Cop
Narue is offline Offline
11,807 posts
since Sep 2004
Sep 22nd, 2005
0

Export Data From Excel to ASP and SQL Server

I Upload Book1.xls in to IISServer machine c:\Inetpub\wwwroot

When I am Using this code in ASP

Dim objConn
Set objConn = Server.CreateObject ("ADODB.Connection")
'response.write Server.mappath("/")
'response.end
objConn.Open "Driver={Microsoft Excel Driver (*.xls)};DriverId=790;DBQ=" & Server.mappath("/book1.xls") &";ReadOnly= true ; UID=admin;"

Dim strSQL
excelfilename = "Book1.xls"

strSQL = "select * from " & excelfilename

Dim objRS
Set objRS = Server.CreateObject ("ADODB.RecordSet")
objRS.Open strSQL, objConn,2,3




Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Excel Driver] The Microsoft Jet database engine cannot open the file 'Book1'. It is already opened exclusively by another user, or you need permission to view its data.

Please help me.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Chandrakumar is offline Offline
2 posts
since Sep 2005
Sep 22nd, 2005
0

Re: Export Data From Excel to ASP and SQL Server

What part of "You're in the wrong forum" is difficult?
Administrator
Reputation Points: 6442
Solved Threads: 1393
Bad Cop
Narue is offline Offline
11,807 posts
since Sep 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
This thread is currently closed and is not accepting any new replies.
Previous Thread in C++ Forum Timeline: Program difficuly
Next Thread in C++ Forum Timeline: How To Remotely Access A Computer: C++





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC