Geniric Data access


Author
Message
Scott
Scott
StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)
Group: Forum Members
Posts: 176, Visits: 1.5K
I noticed that there is a CreateBlankDbCommand method on the DbDataSourceItem object.  Is this the recommended way to create a command object to pass to the various BO methods that accept command objects so that it is generic based on the currect connection?

Using this method would it simply be:

DbDataSourceItem dsItem = DataLayer.DataSources[0];
DbCommand cmd = dsItem.CreateBlankDbCommand();
cmd.CommandText = "SELECT COUNT(*) FROM QDetails WHERE ItemID = @itemID";
cmd.Parameters.Add("@itemID");
cmd.Parameters["@itemID"].Value = ItemID;

Does not specifying the type for the parameter affect the speed? I know you have to give up something for the flexability but I guess what I am asking is it slower by a factor of 1-5ms or 20 - 30 time longer. I just want to know for future reference if there is a process that needs to be "as fast as posible". Thanks for the feedback.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Scott - 19 Years Ago
StrataFrame Team - 19 Years Ago
             Good to know. Thanks for all the info.
Scott - 19 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search