Click here to Skip to main content
15,891,136 members
Home / Discussions / Database
   

Database

 
AnswerRe: Connection Issue While connecting to SqlServer 2000 from ASP.NET 2.0 Pin
Colin Angus Mackay21-Dec-06 23:08
Colin Angus Mackay21-Dec-06 23:08 
QuestionDeleted row outside program problem. Pin
Tomy140221-Dec-06 15:43
Tomy140221-Dec-06 15:43 
AnswerRe: Deleted row outside program problem. Pin
Frank Kerrigan21-Dec-06 23:43
Frank Kerrigan21-Dec-06 23:43 
GeneralRe: Deleted row outside program problem. Pin
Tomy140222-Dec-06 15:21
Tomy140222-Dec-06 15:21 
QuestionHow do you quote parameters for an Oracle Select statement string when the parameter contains a quote? Pin
howardjr21-Dec-06 12:43
howardjr21-Dec-06 12:43 
AnswerRe: How do you quote parameters for an Oracle Select statement string when the parameter contains a quote? Pin
Colin Angus Mackay21-Dec-06 13:24
Colin Angus Mackay21-Dec-06 13:24 
GeneralRe: How do you quote parameters for an Oracle Select statement string when the parameter contains a quote? Pin
howardjr21-Dec-06 16:49
howardjr21-Dec-06 16:49 
GeneralRe: How do you quote parameters for an Oracle Select statement string when the parameter contains a quote? Pin
Mairaaj Khan21-Dec-06 21:17
professionalMairaaj Khan21-Dec-06 21:17 
Perhaps this may help you getting some idea.
SqlCommand cmd = con.CreateCommand();
            cmd.CommandText = "SELECT f1 from t2 WHERE upper(f1) LIKE @criteria";
            cmd.Parameters.Add("@criteria", SqlDbType.VarChar).Value = "%'MAIRAJ%";


Where f1 is a varchar type field in table t2. I tested this against SQL Server 2000, and it works fine.
Parameters in command object provides you a greater flexibility in working with databases (either you want to update, delete, insert, or get data). Plus it also help in preventing SQL Injection Attacks [^]. I will strongly recommend, go for that what Colin Angus Mackay is suggested.

Moreover, .NET provide following types of parameters (among them one may serve you).
OleDbParameter[^]
SqlParameter[^]
OdbcParameter[^]



Regards

________________________________
Success is not something to wait for, its something to work for.

GeneralRe: How do you quote parameters for an Oracle Select statement string when the parameter contains a quote? Pin
Colin Angus Mackay21-Dec-06 23:05
Colin Angus Mackay21-Dec-06 23:05 
GeneralRe: How do you quote parameters for an Oracle Select statement string when the parameter contains a quote? Pin
howardjr22-Dec-06 6:56
howardjr22-Dec-06 6:56 
GeneralRe: How do you quote parameters for an Oracle Select statement string when the parameter contains a quote? Pin
Colin Angus Mackay22-Dec-06 7:00
Colin Angus Mackay22-Dec-06 7:00 
GeneralRe: How do you quote parameters for an Oracle Select statement string when the parameter contains a quote? Pin
Paul Conrad22-Dec-06 7:24
professionalPaul Conrad22-Dec-06 7:24 
GeneralRe: How do you quote parameters for an Oracle Select statement string when the parameter contains a quote? Pin
Colin Angus Mackay22-Dec-06 8:03
Colin Angus Mackay22-Dec-06 8:03 
GeneralRe: How do you quote parameters for an Oracle Select statement string when the parameter contains a quote? Pin
howardjr23-Dec-06 19:43
howardjr23-Dec-06 19:43 
QuestionHow to trim fields on the table Sql Server 2000 ? Pin
kindman_nb21-Dec-06 11:34
kindman_nb21-Dec-06 11:34 
AnswerRe: How to trim fields on the table Sql Server 2000 ? Pin
Colin Angus Mackay21-Dec-06 13:26
Colin Angus Mackay21-Dec-06 13:26 
GeneralRe: How to trim fields on the table Sql Server 2000 ? Pin
kindman_nb22-Dec-06 10:19
kindman_nb22-Dec-06 10:19 
AnswerRe: How to trim fields on the table Sql Server 2000 ? Pin
Frank Kerrigan21-Dec-06 23:46
Frank Kerrigan21-Dec-06 23:46 
GeneralRe: How to trim fields on the table Sql Server 2000 ? Pin
kindman_nb22-Dec-06 0:13
kindman_nb22-Dec-06 0:13 
QuestionData Link support for Data Transformation Services Pin
Jay Legue21-Dec-06 4:07
Jay Legue21-Dec-06 4:07 
AnswerRe: Data Link support for Data Transformation Services Pin
Frank Kerrigan21-Dec-06 23:48
Frank Kerrigan21-Dec-06 23:48 
GeneralRe: Data Link support for Data Transformation Services Pin
Frank Kerrigan21-Dec-06 23:49
Frank Kerrigan21-Dec-06 23:49 
QuestionExternal Linked Servers Pin
Jay Legue21-Dec-06 3:52
Jay Legue21-Dec-06 3:52 
AnswerRe: External Linked Servers Pin
Frank Kerrigan21-Dec-06 23:54
Frank Kerrigan21-Dec-06 23:54 
QuestionODBC Descriptors Pin
Jay Legue21-Dec-06 3:45
Jay Legue21-Dec-06 3:45 

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.