-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: vivek
Message 1 in Discussion


Hi 
Friends
 
I want to 
insert records from excel sheet to sql server 2000 by using query 
(i want to select few columns and rows with some condition) in 
asp.net.
 
Which one of the 
optimize method of it.. I have RND on OPENROWSET, but it gives an error, i have 
execute this query
 
select * into dbo.tbl_CRR_LOG from 
OPENROWSET('Microsoft.Jet.OLEDB.4.0','Excel 
8.0;Database=E:/NewFolder/SI_CCR_Log.xls',[CCR Log$])
ERROR:
Server: Msg 7399, Level 16, 
State 1, Line 1 OLE DB provider 
'Microsoft.Jet.OLEDB.4.0' reported an error. The provider did not give any 
information about the error.

but when i 
execute from ms-access it runs succesfully and display all 
records
SELECT * FROM 
OPENROWSET('Microsoft.Jet.OLEDB.4.0',    
'E:\Projects\NWIND.MDB';'admin';'', Orders) 
 
Please help me 
how to insert bulk of records from excel to sqlserver from dot net 
application.
 
and also tell 
me what are the disadvantages of using 
OPENROWSET.
 
Is 
there any other method which is much optimize of OPENROWSET. Otherwise 
there is one method i.e. Retrieve all records from excel by using oledb provider 
and by loop insert the records into database. Please give me best optimize 
method and please also tell me why this error occured while using 
OPENROWSET.
 
 
Thanks
Vivek 
Vashistha


 

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/BDOTNET/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to