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

New Message on MumbaiUserGroup

-----------------------------------------------------------
From: limson
Message 6 in Discussion

 hi Ashish P              i used ur code it's working fine.but i had a another problem 
it is working fine with 10 to 20 records in excel sheet but i want bulk insert from 
excelsheet to the database that is around 3000 to 5000 records.it will make the 
process very slow and application seems  like it is not responding or hang.   below is 
a function is used in vb6 it was working fine there it is not working in vb.net.   
Private Function ExportExcelSheetToAccess(sSheetName As String, sArSheetName As 
String, sExcelPath As String, sAccessTable As String, sAccessDBPath As String)
    Dim db As Database
    Dim rs As Recordset
    Dim connex As ADODB.Connection 
On Error GoTo gserrHandler
    
    Set db = OpenDatabase(sExcelPath, True, False, "Excel 8.0")
    Call db.Execute("Select * into [;database=" & sAccessDBPath & "]." & _
    sAccessTable & " FROM [" & sSheetName & "$]")
    ExportExcelSheetToAccess = 1
    Exit Function
gserrHandler:
    ExportExcelSheetToAccess = ArExportExcelSheetToAccess("sheet1", "����1", 
sExcelPath, "TEST", App.Path & "\poesms.mxp")
End Function   any help will be appreciated. thanks for ur reply limson

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

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/mumbaiusergroup/_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