Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

excel to oracle using ASP?

Status
Not open for further replies.

Cordel

Programmer
Aug 15, 2000
9
CA
I need to take information from an excel flie and add it to an oracle db using ASP. Any ideas on how to go about this would to a big help. thanks
 
Try to use ExcelDriver & ADO

<%
'constante ADO pentru buna functionare a RecordSetului
Const adOpenStatic = 3
Const adUseClient = 3
Const adLockPessimistic = 2

set rs=server.CreateObject(&quot;ADODB.Recordset&quot;)
cale=server.mappath(&quot;./&quot;)

Set EConnection = Server.CreateObject( &quot;ADODB.Connection&quot; )
EConnection.Open &quot;Driver={Microsoft Excel Driver (*.xls)};DBQ=&quot;&cale+&quot;\template.xls&quot;&&quot;;ReadOnly=0;UID=admin;&quot;
sub ExecuteExcelSQL(byval cmd)
rs.CursorType = adOpenStatic
rs.CursorLocation = adUseClient
rs.LockType = adLockPessimistic
rs.Source = cmd
rs.ActiveConnection = Connection 'The record set needs to know what connection to use.
rs.Open
end sub

%>
this is for reading the excel file

 
Try to use ExcelDriver & ADO
This is my ExcelConection.asp

<%
'constante ADO pentru buna functionare a RecordSetului
Const adOpenStatic = 3
Const adUseClient = 3
Const adLockPessimistic = 2

set rs=server.CreateObject(&quot;ADODB.Recordset&quot;)
cale=server.mappath(&quot;./&quot;)

Set EConnection = Server.CreateObject( &quot;ADODB.Connection&quot; )
EConnection.Open &quot;Driver={Microsoft Excel Driver (*.xls)};DBQ=&quot;&cale+&quot;\template.xls&quot;&&quot;;ReadOnly=0;UID=admin;&quot;
sub ExecuteExcelSQL(byval cmd)
rs.CursorType = adOpenStatic
rs.CursorLocation = adUseClient
rs.LockType = adLockPessimistic
rs.Source = cmd
rs.ActiveConnection = Connection 'The record set needs to know what connection to use.
rs.Open
end sub

%>

This is for reading the excel file

hope this helps you
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top