Export Data From Excel to ASP and SQL Server

Please support our C++ advertiser: Intel Parallel Studio Home
Closed Thread

Join Date: Sep 2005
Posts: 2
Reputation: Chandrakumar is an unknown quantity at this point 
Solved Threads: 0
Chandrakumar Chandrakumar is offline Offline
Newbie Poster

Export Data From Excel to ASP and SQL Server

 
0
  #1
Sep 22nd, 2005
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
Quick reply to this message  
Join Date: Sep 2004
Posts: 7,625
Reputation: Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute 
Solved Threads: 716
Team Colleague
Narue's Avatar
Narue Narue is offline Offline
Code Goddess

Re: Export Data From Excel to ASP and SQL Server

 
0
  #2
Sep 22nd, 2005
That's Visual Basic, not C or C++. Please direct your question to a more appropriate forum.
I'm here to prove you wrong.
Quick reply to this message  
Join Date: Sep 2005
Posts: 2
Reputation: Chandrakumar is an unknown quantity at this point 
Solved Threads: 0
Chandrakumar Chandrakumar is offline Offline
Newbie Poster

Export Data From Excel to ASP and SQL Server

 
0
  #3
Sep 22nd, 2005
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.
Quick reply to this message  
Join Date: Sep 2004
Posts: 7,625
Reputation: Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute 
Solved Threads: 716
Team Colleague
Narue's Avatar
Narue Narue is offline Offline
Code Goddess

Re: Export Data From Excel to ASP and SQL Server

 
0
  #4
Sep 22nd, 2005
What part of "You're in the wrong forum" is difficult?
I'm here to prove you wrong.
Quick reply to this message  
Closed Thread

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC