Home All Groups Group Topic Archive Search About
Author
25 May 2009 1:06 PM
friend
Hello all,

Dim MyConnection As System.Data.OleDb.OleDbConnection
Dim MyCommand As System.Data.OleDb.OleDbDataAdapter

MyConnection = New System.Data.OleDb.OleDbConnection
("provider=Microsoft.Jet.OLEDB.4.0;data source='C:\test.xls';Extended
Properties=Excel 8.0;HDR=YES;")

MyCommand = New System.Data.OleDb.OleDbDataAdapter("select * From
[Tabelle1$]", MyConnection)


1. When I use HDR option either Yes or no...I am getting an error
"ISAM not found"
2. Here I am hardcoding the sheet name i.e., Tabelle1...how to make it
in general ie., getting the sheet names

How to resolve these issues ??

thanks for any help

Author
25 May 2009 4:02 PM
Cor Ligthert[MVP]
If you don't find it here, then search the group

Microsoft.public.dotnet.framework.adonet

http://groups.google.com/group/microsoft.public.dotnet.languages.vb/search?group=microsoft.public.dotnet.languages.vb&q=isam+not+found&qt_g=Search+this+group

Most of us have seen this question so often, that I do it this way

Cor


Show quoteHide quote
"friend" <lavanyaredd***@gmail.com> wrote in message
news:106c1ad8-51ca-445f-b821-f4a0adaa4099@z9g2000yqi.googlegroups.com...
> Hello all,
>
> Dim MyConnection As System.Data.OleDb.OleDbConnection
> Dim MyCommand As System.Data.OleDb.OleDbDataAdapter
>
> MyConnection = New System.Data.OleDb.OleDbConnection
> ("provider=Microsoft.Jet.OLEDB.4.0;data source='C:\test.xls';Extended
> Properties=Excel 8.0;HDR=YES;")
>
> MyCommand = New System.Data.OleDb.OleDbDataAdapter("select * From
> [Tabelle1$]", MyConnection)
>
>
> 1. When I use HDR option either Yes or no...I am getting an error
> "ISAM not found"
> 2. Here I am hardcoding the sheet name i.e., Tabelle1...how to make it
> in general ie., getting the sheet names
>
> How to resolve these issues ??
>
> thanks for any help
Author
25 May 2009 7:55 PM
friend
Show quote Hide quote
On May 25, 6:02 pm, "Cor Ligthert[MVP]" <Notmyfirstn***@planet.nl>
wrote:
> If you don't find it here, then search the group
>
> Microsoft.public.dotnet.framework.adonet
>
> http://groups.google.com/group/microsoft.public.dotnet.languages.vb/s...
>
> Most of us have seen this question so often, that I do it this way
>
> Cor
>
> "friend" <lavanyaredd***@gmail.com> wrote in message
>
> news:106c1ad8-51ca-445f-b821-f4a0adaa4099@z9g2000yqi.googlegroups.com...
>
>
>
> > Hello all,
>
> > Dim MyConnection As System.Data.OleDb.OleDbConnection
> > Dim MyCommand As System.Data.OleDb.OleDbDataAdapter
>
> > MyConnection = New System.Data.OleDb.OleDbConnection
> > ("provider=Microsoft.Jet.OLEDB.4.0;data source='C:\test.xls';Extended
> > Properties=Excel 8.0;HDR=YES;")
>
> > MyCommand = New System.Data.OleDb.OleDbDataAdapter("select * From
> > [Tabelle1$]", MyConnection)
>
> > 1. When I use HDR option either Yes or no...I am getting an error
> > "ISAM not found"
> > 2. Here I am hardcoding the sheet name i.e., Tabelle1...how to make it
> > in general ie., getting the sheet names
>
> > How to resolve these issues ??
>
> > thanks for any help- Hide quoted text -
>
> - Show quoted text -

Thank u...I solved the problem