hi
i just wanted to ask u how can i solve the exception error "couldnot find installable ISAM"
this exception occurs when i run this code :
[CODE=vbnet]Dim excelConnection As System.Data.Ole Db.OleDbConnect ion = New
System.Data.Ole Db.OleDbConnect ion("Provider=M icrosoft.Jet.OL EDB.4.0;Data
Source=c:/test.xls;Extend ed Properties=Exce l 8.0;")
excelConnection .Open()
Dim excelCommand As New System.Data.ole db.OleDbCommand ("INSERT
INTO [OBDC; Driver={SQL
Server};Server= (local);Databas e=FullDate;Trus ted_C onnection=yes].[Population]
SELECT * FROM [Population$];", excelConnection )
'Dim ExcelCommand As New System.Data.Ole Db.OleDbCommand ("SELECT
INTO [ODBC;Driver={SQ L
Server};Server= (local);Databas e=FullDate;Trus ted_C onnectionÂ*=yes].[Population] FROM [Population$];", excelConnection )
excelCommand.Ex ecuteNonQuery()
excelConnection .Close()[/CODE].
ALSO i wanted to ask how can i map importing data from the excel sheet to SQL with the primary key. Can anyone give me a syntax
10x in advance
i just wanted to ask u how can i solve the exception error "couldnot find installable ISAM"
this exception occurs when i run this code :
[CODE=vbnet]Dim excelConnection As System.Data.Ole Db.OleDbConnect ion = New
System.Data.Ole Db.OleDbConnect ion("Provider=M icrosoft.Jet.OL EDB.4.0;Data
Source=c:/test.xls;Extend ed Properties=Exce l 8.0;")
excelConnection .Open()
Dim excelCommand As New System.Data.ole db.OleDbCommand ("INSERT
INTO [OBDC; Driver={SQL
Server};Server= (local);Databas e=FullDate;Trus ted_C onnection=yes].[Population]
SELECT * FROM [Population$];", excelConnection )
'Dim ExcelCommand As New System.Data.Ole Db.OleDbCommand ("SELECT
INTO [ODBC;Driver={SQ L
Server};Server= (local);Databas e=FullDate;Trus ted_C onnectionÂ*=yes].[Population] FROM [Population$];", excelConnection )
excelCommand.Ex ecuteNonQuery()
excelConnection .Close()[/CODE].
ALSO i wanted to ask how can i map importing data from the excel sheet to SQL with the primary key. Can anyone give me a syntax
10x in advance
Comment