ADO.NET is great But I have a problem
I using Stored Procedures and UDFs to Insert and retrieve my data
I can recieve a variable Only from UDF or Stored Procedure
Put when the returned value is a set of records Whats the matter then ?
and very especially: I need to know How to navigate through this set of records Next,Previous,First and Last Programmatically without Binding to Controls
One of my Friends challenge me and Say :"Go and use Recordset as usual"
But I Persist on my opinion that ADO.NET is moore efficient !!!
But next Previous problem STOPS me
Please any help from any of you
sites links,material or code inVB if available please ..
Thanks for All
Many Thanks to Microsoft
I'm really lost as to what your problem is. If you get a dataset back from a stored proc, you can use for each to iterate through the rows, or if you want a prev/next/first/last paradigm, you can reference them by index.
|||Thanks
But can you provide me with any example on how toreference them by index in Any Language please if you can
And Really Is The ADO.NET more efficient than Recordset ?
(To Speak to my friend)
Sorry for my bad english
thanks
|||To be honest, ADO.NET is your only option in ASP.NET afaik.
DataSet dataSet = new DataSet();
SqlConnection connection = createConnection(true);
try
{
sqlCommand.Connection = connection;
SqlDataAdapter dataAdapter = new SqlDataAdapter(sqlCommand);
dataAdapter.Fill(dataSet);
return dataSet;
}
finally
{
connection.Close();
}
Would be an example of getting a dataset back from the database.
I believe that dataSet.Rows[0] would be an example of grabbing a row by index, and dataSet.Rows.Count would tell you how many rows there are.
|||thanks more sir
But Can I speak to you online
this is my msn :moh_omar52@.hotmail.com
I have little bit questions
If you can not O.K
Thnaks in all conditions
Mohamed Omar
|||I would definately prefer that you ask further questions on this forum, so that others can help you if they have a better answer than me, and other users can benefit from my replies.
|||O.K
To be honest, ADO.NET is your only option in ASP.NET afaik.
Really I do not understand this ?(Sorry)
and you speak about ADO.NET 2.0 ( I think that It has great improvments ?)
I mean that there is no implementations in .NET 2.0 that allow to me directly access the Last Or Next Records
Does Really Microsoft puts 70% of its resources to .NET ?
I am sorry If you are annoyed from me !!
I'm not annoyed, if I was, I would stop answering :-)
ADO.NET is the database model for ASP.NET. If you want to use another model, it's not built in, you'd have to do a lot of work to use an inferior model ( inferior because ADO.NET, as a disconnected model, is perfect for web development ).
ADO.NET 2.0 has a lot of new stuff, I've not seen anything I consider an 'improvement' though.
No, you cannot directly access the last nor next records from the DB, because you download ALL The records from your query when you make it. You don't maintain a connection, so the iteration happens entirely in your code, not through a database connection. My code sample shows how to use the dataset you get from the database to step through records if you need to.
I have no idea of percentages, but yes, Microsoft obviously is pushing .NET significantly over and above other options (the only other option being VC++, VB6 is completely unsupported now ).
|||OK.
my Final Questions
Do you See that .NET will be the future of development especially when Vista ships and in the coming 10 Years ?
If I to be obliged to call a Windows API OR Use Unmanaged dll from the .NET World,
Do you think that this will affect my application performance ? %
I really happy with all these answers and Thank you More
I don't see .NET going anywhere. .NET is not fundamental to Vista ( that is, I don't believe Vista uses it ), but Vista is not going to kill it either, they coexist, but are not codependant. I don't know if I will be using C# in 10 years time, but I don't care. Today, it's a good option. I still use C++, and will move back to it if that's what a project needs, or if the world turns back that way. I doubt it though. New languages will pop up from time to time. WPF is a new framework, they will pop up as well. As a developer, you can expect to always be learning and using new things.
If you call a native API, it's possible that things will work faster :-)
Glad to help...
|||Hi my friend
sorry When I spoke to you yesterday I do not test any code BUt
this propety is not found in the dataset
dataSet.Rows[0]
Is not found ?
|||dataSet.Tables(0).Rows(0), or dataSet.Tables[0].Rows[0] ( first VB, then C# )
The dataset has a collection of tables, each table has a collection of rows.
No comments:
Post a Comment