Click here to Skip to main content
16,006,013 members
Home / Discussions / C#
   

C#

 
GeneralRe: SQL query in c# Pin
Yevgeny Efter29-Mar-08 7:17
Yevgeny Efter29-Mar-08 7:17 
GeneralRe: SQL query in c# Pin
Giorgi Dalakishvili29-Mar-08 7:22
mentorGiorgi Dalakishvili29-Mar-08 7:22 
GeneralRe: SQL query in c# Pin
Yevgeny Efter29-Mar-08 7:31
Yevgeny Efter29-Mar-08 7:31 
GeneralRe: SQL query in c# Pin
User 665829-Mar-08 7:55
User 665829-Mar-08 7:55 
GeneralRe: SQL query in c# Pin
Yevgeny Efter29-Mar-08 8:13
Yevgeny Efter29-Mar-08 8:13 
GeneralRe: SQL query in c# Pin
Luis Alonso Ramos29-Mar-08 12:34
Luis Alonso Ramos29-Mar-08 12:34 
GeneralRe: SQL query in c# Pin
Yevgeny Efter30-Mar-08 0:13
Yevgeny Efter30-Mar-08 0:13 
GeneralRe: SQL query in c# Pin
Luis Alonso Ramos30-Mar-08 1:04
Luis Alonso Ramos30-Mar-08 1:04 
Yevgeny Efter wrote:
If I decide to write a stored procedure, where do I store it?


It goes in your SQL Server database. You need to run the SQL query so the SP is created (the CREATE PROCEDURE thing). Search Google for "SQL server stored procedures"[^] and you will get a lot of info.


Yevgeny Efter wrote:
When you write "cmd = new SqlCommand("sp_Test", conn);", how will SQL Server know what "sp_Test" is?


Sorry, I missed that part (I didn't compile and run the code). By default it is a regular query (CommandType.CommandText). For a SP, you must specify it:
cmd.CommandTpe = CommandType.StoredProcedure;
I hope this helps!

Luis Alonso Ramos
Intelectix
Chihuahua, Mexico

My Blog!

GeneralRe: SQL query in c# Pin
Yevgeny Efter30-Mar-08 6:00
Yevgeny Efter30-Mar-08 6:00 
GeneralMicrosoft Windows Software Development Kit Pin
BlitzPackage29-Mar-08 4:47
BlitzPackage29-Mar-08 4:47 
GeneralRe: Microsoft Windows Software Development Kit Pin
Colin Angus Mackay29-Mar-08 5:33
Colin Angus Mackay29-Mar-08 5:33 
Generalmodeling tool OnPaint Pin
Gareth H29-Mar-08 4:15
Gareth H29-Mar-08 4:15 
GeneralRe: modeling tool OnPaint Pin
Colin Angus Mackay29-Mar-08 5:37
Colin Angus Mackay29-Mar-08 5:37 
GeneralRe: modeling tool OnPaint Pin
Gareth H29-Mar-08 5:45
Gareth H29-Mar-08 5:45 
GeneralRe: modeling tool OnPaint Pin
Colin Angus Mackay29-Mar-08 5:56
Colin Angus Mackay29-Mar-08 5:56 
General.NET Application to sent a FAX Pin
Member 388976029-Mar-08 4:13
Member 388976029-Mar-08 4:13 
GeneralRe: .NET Application to sent a FAX Pin
Gareth H29-Mar-08 4:19
Gareth H29-Mar-08 4:19 
GeneralDatabase connection problem Pin
wsamuel29-Mar-08 4:05
wsamuel29-Mar-08 4:05 
GeneralRe: Database connection problem Pin
Gareth H29-Mar-08 4:18
Gareth H29-Mar-08 4:18 
GeneralRe: Database connection problem Pin
wsamuel29-Mar-08 5:23
wsamuel29-Mar-08 5:23 
GeneralRe: Database connection problem Pin
Gareth H29-Mar-08 5:50
Gareth H29-Mar-08 5:50 
GeneralRe: Database connection problem Pin
wsamuel29-Mar-08 16:36
wsamuel29-Mar-08 16:36 
GeneralRe: Database connection problem Pin
nelo_29-Mar-08 13:10
nelo_29-Mar-08 13:10 
GeneralRe: Database connection problem [modified] Pin
wsamuel29-Mar-08 16:41
wsamuel29-Mar-08 16:41 
GeneralKeeping data-file consistent at computer-crash Pin
Frygreen29-Mar-08 0:14
Frygreen29-Mar-08 0:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.