PDA

View Full Version : Error trying to bind dataset to datagrid


erikkl2000
01-31-2007, 11:35 PM
Hi,

I am a .net developer that is learning dreamweaver for the hell of it..

Everthing went well up to trying to bind a datagrid to a dataset..

I created the datagrid and did a select so i am reveiving my data..

here is my datagrid

<asp:DataGrid AutoGenerateColumns="true" BorderColor="#993333" DataMember="Employees" DataSource="<%# DataSet1.DefaultView %>" ID="dgWOW" runat="server" gridline="Horizontal">

</asp:DataGrid>


Here is my error------------


System.ArgumentException: An OLE DB Provider was not specified in the ConnectionString. An example would be, 'Provider=SQLOLEDB;'.
at System.Data.OleDb.OleDbConnectionString.ValidatePr ovider(String progid)
at System.Data.OleDb.OleDbConnectionString.ValidateCo nnectionString(String connectionString)
at System.Data.OleDb.OleDbConnectionString..ctor(Stri ng connectionString, Boolean validate)
at System.Data.OleDb.OleDbConnectionFactory.CreateCon nectionOptions(String connectionString, DbConnectionOptions previous)
at System.Data.ProviderBase.DbConnectionFactory.GetCo nnectionPoolGroup(String connectionString, DbConnectionPoolGroupOptions poolOptions, DbConnectionOptions& userConnectionOptions)
at System.Data.OleDb.OleDbConnection.ConnectionString _Set(String value)
at System.Data.OleDb.OleDbConnection.set_ConnectionSt ring(String value)
at System.Data.OleDb.OleDbConnection..ctor(String connectionString)
at DreamweaverCtrls.DataSet.NewDbConnection(String strConnection)
at DreamweaverCtrls.DataSet.DoInit()System.ArgumentEx ception: An OLE DB Provider was not specified in the ConnectionString. An example would be, 'Provider=SQLOLEDB;'.
at System.Data.OleDb.OleDbConnectionString.ValidatePr ovider(String progid)
at System.Data.OleDb.OleDbConnectionString.ValidateCo nnectionString(String connectionString)
at System.Data.OleDb.OleDbConnectionString..ctor(Stri ng connectionString, Boolean validate)
at System.Data.OleDb.OleDbConnectionFactory.CreateCon nectionOptions(String connectionString, DbConnectionOptions previous)
at System.Data.ProviderBase.DbConnectionFactory.GetCo nnectionPoolGroup(String connectionString, DbConnectionPoolGroupOptions poolOptions, DbConnectionOptions& userConnectionOptions)
at System.Data.OleDb.OleDbConnection.ConnectionString _Set(String value)
at System.Data.OleDb.OleDbConnection.set_ConnectionSt ring(String value)
at System.Data.OleDb.OleDbConnection..ctor(String connectionString)
at DreamweaverCtrls.DataSet.NewDbConnection(String strConnection)
at DreamweaverCtrls.DataSet.DoInit()System.Exception: The DefaultView was requested but no tables yet exist.
at DreamweaverCtrls.DataSet.get_DefaultView()System.A rgumentException: An OLE DB Provider was not specified in the ConnectionString. An example would be, 'Provider=SQLOLEDB;'.
at System.Data.OleDb.OleDbConnectionString.ValidatePr ovider(String progid)
at System.Data.OleDb.OleDbConnectionString.ValidateCo nnectionString(String connectionString)
at System.Data.OleDb.OleDbConnectionString..ctor(Stri ng connectionString, Boolean validate)
at System.Data.OleDb.OleDbConnectionFactory.CreateCon nectionOptions(String connectionString, DbConnectionOptions previous)
at System.Data.ProviderBase.DbConnectionFactory.GetCo nnectionPoolGroup(String connectionString, DbConnectionPoolGroupOptions poolOptions, DbConnectionOptions& userConnectionOptions)
at System.Data.OleDb.OleDbConnection.ConnectionString _Set(String value)
at System.Data.OleDb.OleDbConnection.set_ConnectionSt ring(String value)
at System.Data.OleDb.OleDbConnection..ctor(String connectionString)
at DreamweaverCtrls.DataSet.NewDbConnection(String strConnection)
at DreamweaverCtrls.DataSet.DoInit()System.Exception: The DefaultView was requested but no tables yet exist.
at DreamweaverCtrls.DataSet.get_DefaultView()
-------------------------

can someone please tell me what i am doing wrong here?

***I know the connection is fine because i did a select when i design it..


Thanks a lot

Erik.

davidj
02-01-2007, 06:12 AM
hi erik

first off...
we dont have a .net expert so the chances are slim that this will be answered


I am a .net developer that is learning dreamweaver for the hell of it..

i dont understand..
if your already a developer then you would be able to id this error by debuging. If dreamweaver is causing an unidentified error then stop using wizards and go back to hand coding. I just cant understand why a programmer would choose to use a wizard driven App.
if your anyone like me then you would hate the code it writes and will rewrite it at the earliest opportunity.

actually looking at the error it looks like your connection string is incorrect
it tells you this here...

An OLE DB Provider was not specified in the ConnectionString. An example would be, 'Provider=SQLOLEDB;

so you just have to sort out your 'OLE DB Provider'