There was a bug in the earlier versions of the library you should check for.
The line is something like (not exactly, but something like):
tableName += 1;
I am not sure it is still present by the 2005 library, but it was something
I remarked on early on that kept popping up in new builds. With the bug, you
end up with table mappings like so:
Table
Table1
Table11
Table111
The actual auto named tables are:
Table
Table1
Table2
Table3
Not sure if this is the problem, as I have not perused through the 2005
library, but it is one thing I would look at.
--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA
*************************************************
| Think outside the box!
|
*************************************************
"<M>" <(E-Mail Removed)> wrote in message
news:19309c65-31c5-4c7c-820f-(E-Mail Removed)...
> Hi,
>
> I'm sure this has been answerd before somewhere and i'm just not
> searching on the right keywords, so could someone point me in the
> right direction?
>
> I'm using .NET 1.1 and the Enterprise Library June 2005 to build a web
> application. The application has numerous drop down list controls for
> the user to make their selections through and I thought it would be a
> good idea to base these on DataTables held within a DataSet populated
> from a Stored Procedure. (If this concept is wrong then stop me at
> this point and educate me please!)
>
> The problem I seem to be having is that I can't get the SP to populate
> the DataSet.
>
> He're some of my attempts:
> Dim db As Database = DatabaseFactory.CreateDatabase("VideoClub")
> Dim ds As DataSet = New DataSet
> Dim dbc As DBCommandWrapper
>
> ' Attempt 1
> dbc = db.GetStoredProcCommandWrapper("udpLists")
> Call db.LoadDataSet(dbc, ds, "Genre") ' Failed
>
> ' Attempt 2
> dbc = db.GetSqlStringCommandWrapper("SELECT * FROM tblMyTable")
> Call db.LoadDataSet(dbc, ds, "Genre") ' Success
>
> ' Attempt 3
> dbc = db.GetStoredProcCommandWrapper("udpLists")
> ds = db.ExecuteDataSet(dbc) ' Failed
>
> Return ds
>
> Each attempt was run on its own and only the second version returned
> any data. Unfortunately it uses hardcoded SQL and I don't like that
> idea as I prefer to leave all data selection to SQL Server via SP's.
> (again, if i'm off the mark here then please let me know!).
>
> So assuming you've not already corrected me, how can I achieve my aim
> of populating a DataSet from a SP? Any suggestions?
>
> Cheers,
>
> <M>
|