|
-
Dec 28th, 2002, 06:14 PM
#1
Thread Starter
Fanatic Member
Transactions
You are creating an ASP.NET application for your company. The company data is stored in a Microsoft SQL Server 6.5
database. Your application generates accounting summary reports based on transaction tables that contain million of rows.
You want your application to return each summary report as quickly as possible. You need to configure your application to
connect to the database and retrieve the data in a away that achieves this goal.
What should you do? choose a or b
a. Use a SqlConnection object to connect to the database, and use a SqlCommand object to run a stored <br>
procedure that returns the dat
b. Use an OleDbConnection object to connect to the database, and use an OleDbCommand <br>object to run a stored procedure that returns the data.
-
Dec 28th, 2002, 07:50 PM
#2
Frenzied Member
Well, transactions is a feature that * I think* is handled by the CLR in runtime, meaning if not all SQL queries where able to execute, then a rollback is performed in the db and no data is corrupted/altered, if updates are being performed.
I would use an sqlconnection, just because the db is SQL. It is optimized for that database. oledb is good for use for smaller transactions, and when you want to use the dataset object. I encountered problems when I used the dataset with sqlconnection.
I suggest that you read a little about ADO.NET, and there you will find detailed answers to your question.
best regards
Henrik
-
Dec 28th, 2002, 09:28 PM
#3
PowerPoster
The answer is B.
If my memory serves me correctly, the sql data provider only works with sql server versions that are 7 or above.
Last edited by Lethal; Dec 28th, 2002 at 10:13 PM.
-
Dec 29th, 2002, 06:11 AM
#4
Frenzied Member
Well, in order for sqlclient to work, you need MDAC 2.6 or higher installed on the server. Or else you will get an exception...
best regards
Henrik
-
Dec 29th, 2002, 11:01 AM
#5
PowerPoster
I verified my comments. Only SQL Server 7 or above is compatible with the SQL client provider. Anything lower you will have to use oledb or odbc.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|