Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Program slow
Message
From
09/08/2004 16:44:22
 
 
To
09/08/2004 16:19:19
General information
Forum:
ASP.NET
Category:
Other
Title:
Miscellaneous
Thread ID:
00931780
Message ID:
00931878
Views:
17
I don't know if it makes any difference, but your connection string is slightly different than mine ... it looks like you have extraneous quotes and I don't know if that matters. Mine would be like this:
sConnStr = "provider=Microsoft.Jet.OLEDB.4.0; " & _
                                        "data source=" & strDatabase & "; " & _
                                        "Extended Properties=Excel 8.0;HDR=NO;ReadOnly=False;"
I'm assuming that your CreateAdapter() method takes care of the Command string for SELECTing from the Excel table? The only other thing I can think of is that maybe your DataSetObject's table names don't correspond to the DataTableName that you're specifying in your .Fill() method.

~~Bonnie




>i am trying your way, but i am having a little difficulty.
>
>I am trying to load an excel spreadsheet into a dataset and I keep getting the error database or object is readonly. The spreadsheet is not your typical database layout, so i don't know if that has anything to do with it or not. below is my basics. thanks for the help.
>
>
>sConnStr = "provider=Microsoft.Jet.OLEDB.4.0; " & _
>                                        "data source=" & strDatabase & "; " & _
>                                        "Extended Properties=""Excel 8.0;HDR=NO;ReadOnly=False;"""
>
>OpenConnection() ' works great
>CreateAdapter()  ' works great
>CreateDataSet()  ' works great
>DataAdapter.Fill(DataSetObject, DataTableName)  ' error
>CloseConnection() ' works great
>
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform