star4
asked on
Fast Loading Of Typed DataSet ...
hi..
i have a typed dataset that contains 15 tables as one object
or dataset.
i'm trying to fill the whole object at one time only,
i mean to do like :
DaSQL.Fill(Ds)
the way i'm doing is to do a loop for each table in my object
,get table name and Fill it
DaSQL.fill(Ds,TableName)
that means i'm going to the Db 15 times and thus making
slowness in loading the object.
the select sts are stored procedures for each table, those
contains alot of inner joins .
is there a way i can fill my dataset tables at one time,by going to the Db only once ..so it well be fast
How To Make DataSet Filling Fast other that taking out constraints and notifications...
i have a typed dataset that contains 15 tables as one object
or dataset.
i'm trying to fill the whole object at one time only,
i mean to do like :
DaSQL.Fill(Ds)
the way i'm doing is to do a loop for each table in my object
,get table name and Fill it
DaSQL.fill(Ds,TableName)
that means i'm going to the Db 15 times and thus making
slowness in loading the object.
the select sts are stored procedures for each table, those
contains alot of inner joins .
is there a way i can fill my dataset tables at one time,by going to the Db only once ..so it well be fast
How To Make DataSet Filling Fast other that taking out constraints and notifications...
ASKER
dim strsql as string = "select * from table1; select * from table2; select * from table3" 'etc
this is fine , but i'm doing my Select Sts in Stored Procedures, its not like what you give
normal select , its complex ones that contains a lot of inner join , and i don't to put it in a string...
this is fine , but i'm doing my Select Sts in Stored Procedures, its not like what you give
normal select , its complex ones that contains a lot of inner join , and i don't to put it in a string...
Hi Star4,
You can't use multiple stored procedures in one dataadapter but you can have more then one select statement in single stored procedure. It works about the same way I described above. you can loop through the dataadapter with the .NextResult property.
look here also
https://www.experts-exchange.com/questions/20995058/SQL-Server-ADO-Multiple-Tables.html
You can't use multiple stored procedures in one dataadapter but you can have more then one select statement in single stored procedure. It works about the same way I described above. you can loop through the dataadapter with the .NextResult property.
look here also
https://www.experts-exchange.com/questions/20995058/SQL-Server-ADO-Multiple-Tables.html
ASKER
this is nice and i try it .
but i'm getting an error saying "there is already a connection is opened"
can you give me an example ..
i'm using a typed dataset and i need to fill using DaSql.Fill + one time going to Db
for all tables. is this possible and how ?
but i'm getting an error saying "there is already a connection is opened"
can you give me an example ..
i'm using a typed dataset and i need to fill using DaSql.Fill + one time going to Db
for all tables. is this possible and how ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
do something like
dim strsql as string = "select * from table1; select * from table2; select * from table3" 'etc ....
dim da as new sqldataadapter(strsql,your
you will have one small problem when using this method and that is the table names, ADO.net will name the tables
table, table1, table2 etc...
when you want to assign your one names, you have to use the tablemapping method of the dataadapter like
da.tablemappings.add('tabl
da.tablemappings.add('tabl