CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > starter_kits_and_source_projects.microsoft_application_blocks Tags:
Item Type: NewsGroup Date Entered: 8/26/2005 5:30:11 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 1 Views: 57 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
2 Items, 1 Pages 1 |< << Go >> >|
texasricky
Asp.Net User
Insert SQL taking long time8/26/2005 5:30:11 PM

0/0

Hi,

I'm experince slowness on using the data application block to insert a record into DB. So, to prove it, I created the non-application block code to insert a record and it come back right away, I'm talking about second vs minutes here, does anyone experince this problem? hope this is soemthing simple that I'm missing here. By the way, the db is using SQL server.

using Application Block ex:

string sql = "INSERT INTO emp (firstName, lastName, InsertDate) VALUES ('John', 'Smith',  GETDATE())";

DBCommandWrapper insertCommandWrapper = db.GetSqlStringCommandWrapper(sql);

IDbConnection connection = db.GetConnection();

connection.Open();

IDbTransaction transaction = connection.BeginTransaction();

db.ExecuteNonQuery(insertCommandWrapper);

transaction.Commit();

connection.Close();

*****************************************88
using non-Application Block ex:

SqlConnection myConnection;

myConnection = new SqlConnection("server=myserver; database=newDB;");

string insertCmd = "INSERT INTO emp (firstName, lastName, InsertDate) VALUES ('John', 'Smith',  GETDATE())";

SqlCommand myCommand =
new SqlCommand(insertCmd, myConnection);

myCommand.Connection.Open();

myCommand.ExecuteNonQuery();

myCommand.Connection.Close();



 

smithb
Asp.Net User
Re: Insert SQL taking long time9/27/2005 2:30:05 AM

0/0

Hi Ricky,

I haven't experienced the performance problems the you are seeing.  However, I'm not suprised that your second block of code was much faster. There is no need for the transaction in the DAAB code.  Try it without the transaction and see if you still have the problem.

 

2 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Oracle Database 10g PL/SQL 101: Learn to Write Powerful PL/SQL Programs Authors: Christopher Allen, Pages: 416, Published: 2004
Expert Oracle Database 10g Administration Authors: Sam R. Alapati, Pages: 1276, Published: 2005
Transact-SQL Programming: Covers Microsoft SQL Server 6. 5 /7. 0 and Sybase Adaptive Server 11. 5 Authors: Kevin E. Kline, Lee Gould, Andrew Zanevsky, Pages: 807, Published: 1999
Beginning PL/SQL: From Novice to Professional Authors: Donald Bales, Pages: 468, Published: 2007
Oracle SQL*Plus: The Definitive Guide Authors: Jonathan Gennick, Pages: 554, Published: 2005
Pro Drupal Development Authors: John K. VanDyk, Dries Buytaert, Pages: 704, Published: 2008
PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide Authors: Larry Edward Ullman, Pages: 572, Published: 2003
Beginning ASP.NET 3.5 in VB 9.0: From Novice to Professional Authors: Matthew MacDonald, Pages: 1149, Published: 2007
Beginning SQL Server 2005 Administration Authors: Dan Wood, Chris Leiter, Paul Turley, Pages: 574, Published: 2006
SQL: The Complete Reference Authors: James R. Groff, Paul N. Weinberg, Pages: 1050, Published: 2002

Web:
Insert statement takes long time to run - ITtoolbox Groups Insert statement takes long time to run ITtoolbox Groups. ... Parallel job: Retrieve sql codes on a failed upsert ...
SQL Server Insert Statement taking a long time : Sql Server Code This query takes a really long time. I suspect there are ways I could improve the structure. Could someone knowledgeable take a look and see if there's ...
[#SDK-11430] Bulk Insert in SQL Lite is taking very long time to ... Jun 21, 2007 ... We are trying to make bulk insert in the SQL Lite but it is taking long time to complete the task. For 8 columns and 1200 rows, it is taking ...
Google Answers: SQL Server Insert Query Problem To make the long story short, insert query takes long time to execute for the first time but the rest takes very short time. I can give you access to my sql ...
Google Answers: SQL Server Insert Query Problem To make the long story short, insert query takes long time to execute for the first time but the rest takes very short time. I can give you access to my sql ...
SQL SERVER - DBCC SHRINKFILE Takes Long Time to Run « Journey to ... Jul 25, 2008 ... 3 Responses to “SQL SERVER - DBCC SHRINKFILE Takes Long Time to Run” ... SQL SERVER - Insert Data From One Table to Another Table - INSERT ...
MySQL Bugs: #5453: Long inserts take very long time Description: Performing a long insert (160000 text characters) takes a very long time to insert into the database. (database located on 10/100 network) How ...
TheMSsForum.com >> SQL Server >> how to insert file to SQL server ... I am using SQL Bulk insert command. But I have problem will adding the data ... Issue: Whenever a sub-query runs in 2005 it is taking long time to execute. ...
AutoMate Discussion Forums - SQL select from and then insert into Topic Title: SQL select from and then insert into Topic Summary: ... This is working but it is taking a long time to loop throught the dataset and insert ...
EXEC sp w/ BULK INSERT - problem w/ security in Access ADP SQL interface, BULK INSERT does in 4 minutes what DoCmd.TransferText takes 40+ ... Finally, even 4 minutes can still be a long time to load the file if you ...

Videos:
An Introduction to SQLite Google TechTalks May 31, 2006 Richard Hipp ABSTRACT SQLite is a small C library that implements a self-contained, embeddable, zero-configuration SQ...
A Googly MySQL Cluster Talk Google TechTalks April 28, 2006 Stewart Smith Stewart Smith works for MySQL AB as a software engineer working on MySQL Cluster. He is an active memb...
Mac OS Automator: Doing things over and over is over. Google TechTalks June 27, 2006 Sal Soghoian ABSTRACT Mac OS X "Tiger" introduces Automator, a new application that automates anything on your compu...




Search This Site:










web part java script runs at top of html web page overriding style sheet

print

programmatically populating the treeview

can we have this type of dynamic treeview?

dnn-yellow?

arggg ... dnn4 w/ starterkit, vwd, and sqlexpress install problem

did not receive a verification code

dotnetnukerocks gallery pa

dnn not bobby compliant?

beginning to learn cms. please help.

please explain "what is singleton design pattern? what does volatile provide? "

custom controls

storing password

sort function is not working during first click?

forms security questions-revisited??

cannot access the security page in asp.net configuration

public class, public function...

question regarding order encryption

reading/writing microsoft word document metadata

search module not available

new to asp

banana mobile inc project problem

sql connection error

weird behavior with linkbuttons

how to install and run the asp.net 2.0 starter kits?

eeeeek! need some pointers on my first .asp project...

2.1.2 iis can't login

dnn 3.1 operational problems

hide browser toolbar, menu, …

using common buttons....

 
All Times Are GMT