Click here to Skip to main content
15,913,486 members
Home / Discussions / Database
   

Database

 
GeneralRe: SQL database problem Pin
Christian Graus22-Aug-04 15:30
protectorChristian Graus22-Aug-04 15:30 
GeneralRe: SQL database problem Pin
Colin Angus Mackay23-Aug-04 4:12
Colin Angus Mackay23-Aug-04 4:12 
GeneralEnterprise level database access in C#/.net Pin
Salil Khedkar19-Aug-04 21:36
Salil Khedkar19-Aug-04 21:36 
GeneralRe: Enterprise level database access in C#/.net Pin
Christian Graus22-Aug-04 15:27
protectorChristian Graus22-Aug-04 15:27 
GeneralDisplaying a DataGrid in child Form Pin
abhishk2001@yahoo.com19-Aug-04 13:01
abhishk2001@yahoo.com19-Aug-04 13:01 
GeneralAssembly resource not found Pin
unosinu19-Aug-04 6:00
unosinu19-Aug-04 6:00 
GeneralRe: Assembly resource not found Pin
Mekong River21-Aug-04 4:57
Mekong River21-Aug-04 4:57 
GeneralSQL query with parameter and % Pin
YomYom19-Aug-04 4:58
YomYom19-Aug-04 4:58 
Hello

I am working on very simple SQL query but the resultset is not what I am waiting for.

cmdSelectConfigurations.CommandText = "SELECT Config_Number, Config_Type, " +
"Model_Serie, Serial_Number, Install_Customer_Nb, Install_Customer_Name, " +
"Install_Postcode, Install_City, Star_Zone, Install_Date " +
"FROM Configurations WHERE Config_Type like @Config_Type";

cmdSelectConfigurations.Parameters.Add(new SqlParameter(
"@Config_Type", SqlDbType.Char, 10, "Config_Type"));

cmdSelectConfigurations.Parameters["@Config_Type"].Value = @"%" + Search.ConfigType + @"%";

the character '%' seems to not be understanding, it seems to be understanding like '_'.
It considerates only one charactere before and after the value.

The query is OK when I put "'%" + AValue + "%'" directly in the Command text.
but it is always wrong when I try to use a parameter.

Thank you for your help

GeneralRe: SQL query with parameter and % Pin
Chris Meech19-Aug-04 8:29
Chris Meech19-Aug-04 8:29 
GeneralRe: SQL query with parameter and % Pin
YomYom19-Aug-04 10:23
YomYom19-Aug-04 10:23 
GeneralRe: SQL query with parameter and % Pin
Looney Tunezez19-Aug-04 11:10
Looney Tunezez19-Aug-04 11:10 
QuestionHow to store and retrieve metadata about a database table column? Pin
Salil Khedkar19-Aug-04 2:48
Salil Khedkar19-Aug-04 2:48 
AnswerRe: How to store and retrieve metadata about a database table column? Pin
Colin Angus Mackay19-Aug-04 4:09
Colin Angus Mackay19-Aug-04 4:09 
GeneralRe: How to store and retrieve metadata about a database table column? Pin
Salil Khedkar19-Aug-04 20:09
Salil Khedkar19-Aug-04 20:09 
QuestionHow can i add 2 querys from a select statement Pin
Member 123213618-Aug-04 22:07
Member 123213618-Aug-04 22:07 
AnswerRe: How can i add 2 querys from a select statement Pin
Colin Angus Mackay18-Aug-04 22:58
Colin Angus Mackay18-Aug-04 22:58 
AnswerRe: How can i add 2 querys from a select statement Pin
Pradeep Shamarao3-Sep-04 4:36
Pradeep Shamarao3-Sep-04 4:36 
GeneralConvert SQL Server to Oracle Script Pin
Vadim Tabakman18-Aug-04 17:51
Vadim Tabakman18-Aug-04 17:51 
GeneralADO Recordset querie Pin
Asha Rams18-Aug-04 17:41
Asha Rams18-Aug-04 17:41 
General:confused: Password text is always shown in ConnectionString Pin
scadena18-Aug-04 11:48
scadena18-Aug-04 11:48 
GeneralRe: :confused: Password text is always shown in ConnectionString Pin
mav.northwind22-Aug-04 1:27
mav.northwind22-Aug-04 1:27 
GeneralDataColumn Expresion problem Pin
blankg18-Aug-04 5:16
blankg18-Aug-04 5:16 
GeneralRe: DataColumn Expresion problem Pin
Syed Abdul Khader18-Aug-04 6:33
Syed Abdul Khader18-Aug-04 6:33 
GeneralRe: DataColumn Expresion problem Pin
blankg18-Aug-04 7:42
blankg18-Aug-04 7:42 
Generalhelp... (Java trouble) Pin
PeVoo17-Aug-04 17:08
PeVoo17-Aug-04 17:08 

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.