Jump to content
Xtreme .Net Talk

Recommended Posts

Posted (edited)

Hi Everyone,

 

 

Just a quick question here -

 

Is there any real advantage in using the SqlCommand object (or any Command object, for that matter)?

 

 

TIA,

Paul.

Edited by mandelbrot
Posted
Hi Everyone,

 

 

Just a quick question here -

 

Is there any real advantage in using the SqlCommand object (or any Command object, for that matter)?

 

 

TIA,

Paul.

Well if you want to get data out of a database using managed code, its the only way I know of. . .

Joe Mamma

Amendment 4: The right of the people to be secure in their persons, houses, papers, and effects, against unreasonable searches and seizures, shall not be violated, and no warrants shall issue, but upon probable cause, supported by oath or affirmation, and particularly describing the place to be searched, and the persons or things to be seized.

Amendment 9: The enumeration in the Constitution, of certain rights, shall not be construed to deny or disparage others retained by the people.

Posted (edited)

...and expanding on this...

 

Sorry, guys - I didn't receive an e-mail for this thread *(I've set the option in my control panel, now - missed it before!)*, and haven't managed to get back for quite a while.

 

Yep - I was actually using a DataSet object and noticed that you can enter the SQL command directly as a string. I didn't realise that doing this actually makes the DataSet generate an SQL Command object.

 

Just to extend this question further, then:

 

Is there any advantage, also, to using parameters? After all, the query string could be built up using appended strings then submitted as a Command directly, instead of having to use parameter objects...

 

 

(Please note that these are more questions, I suppose, of "what is good and bad practice within OOP and VS.NET?").

 

 

Thanks again, to you all.

 

 

Paul.

Edited by mandelbrot
  • Administrators

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...