Arg81
Well-known member
Hi guys,
I've just been reading a book on SQL and VB.net programming, and after getting 50% of the way through my project, I'm now being advised not to do it the way I have...
Originally I have worked against an MS Book (ADO.NET) which goes through creating dataAdapters and using SELECT statements to get the info from the server.
Now I've read that the best way is to encapsulate a lot of T-SQL within Stored Procedures to return the data, and then create a DA for the SP. This makes the SQL server perform better and return results quicker.
My biggest corcern is that this project is aimed primarily at 10-15 users, which will increase to 20-30 over a year or so, so I want to programme it the best way now so I don't have to do it all again in a years time. Our SQL server will also be used for our HR software later on in the year, so I don't want to laden it with a lot of processes coming out of this and following projects.
Can someone please tell me the best way???
My search forms (instead of returning 10,000+ records) are all the same coding, but with different parameters set. Because I have an employees table and this is related to more than one field in the main table (Contact, Account Manager, Created By, Supervisor etc), then I have to create a dataAdapter for each one. Therefore each search form has over 10 dataAdapters (only 3 are set for SELECT, INSERT, UPDATE and DELETE, the rest are SELECT only) - is this a problem?
Obviously as a Stored Procedure, all of the different EmployeeID's will be taken at that time, so only one dataAdapter is used on the SP, instead of a DataAdapter for each table.
I've also read that it doesn't matter about dataSets - I.E I'm pulling data from 2 databases on the same server, but both tables are generated in the same dataset. As these tables don't have a datarelation (the Customer table is just a select table for the CustomerID in my main table), I assume it's OK to put the Customer table into a seperate dataSet by itself?
...Head is spinning again!!!!!
Cheers
Luke
I've just been reading a book on SQL and VB.net programming, and after getting 50% of the way through my project, I'm now being advised not to do it the way I have...
Originally I have worked against an MS Book (ADO.NET) which goes through creating dataAdapters and using SELECT statements to get the info from the server.
Now I've read that the best way is to encapsulate a lot of T-SQL within Stored Procedures to return the data, and then create a DA for the SP. This makes the SQL server perform better and return results quicker.
My biggest corcern is that this project is aimed primarily at 10-15 users, which will increase to 20-30 over a year or so, so I want to programme it the best way now so I don't have to do it all again in a years time. Our SQL server will also be used for our HR software later on in the year, so I don't want to laden it with a lot of processes coming out of this and following projects.
Can someone please tell me the best way???
My search forms (instead of returning 10,000+ records) are all the same coding, but with different parameters set. Because I have an employees table and this is related to more than one field in the main table (Contact, Account Manager, Created By, Supervisor etc), then I have to create a dataAdapter for each one. Therefore each search form has over 10 dataAdapters (only 3 are set for SELECT, INSERT, UPDATE and DELETE, the rest are SELECT only) - is this a problem?
Obviously as a Stored Procedure, all of the different EmployeeID's will be taken at that time, so only one dataAdapter is used on the SP, instead of a DataAdapter for each table.
I've also read that it doesn't matter about dataSets - I.E I'm pulling data from 2 databases on the same server, but both tables are generated in the same dataset. As these tables don't have a datarelation (the Customer table is just a select table for the CustomerID in my main table), I assume it's OK to put the Customer table into a seperate dataSet by itself?
...Head is spinning again!!!!!
Cheers
Luke