|
|
How 'bout putting the wildcard character within the parameter?
string strName = "%john%"
string strSQL = "select * from table_A where firstName like ':PARAM'"
Then assign to your parameter the value of strName.
Chris Meech
I am Canadian. [heard in a local bar]
Gently arching his fishing rod back he moves the tip forward in a gentle arch releasing the line.... kersplunk [Doug Goulden]
Nice sig! [Tim Deveaux on Matt Newman's sig with a quote from me]
|
|
|
|
|
In C# windows application:
There is a datagrid. I add more than 1 record. How can I save all these records in table at one go?
Similary for update/delete
I am currently using the following code to handle one record:
int aa=Int32.Parse(dataGrid1[dataGrid1.CurrentRowIndex,0].ToString());
string ss=dataGrid1[dataGrid1.CurrentRowIndex,1].ToString();
string ins="Insert into test values("+aa+","+"'"+ss+"')";
dt=cc.conn(ins);
dt.AcceptChanges();
|
|
|
|
|
Do you really think this is the appropriate way to learn about a new control? None of your questions is out of line, but asking this many questions about one subject leads me to think you'd be much better if you took the time to do some basic research or sit down with a good book.
A lot has been written about how to use the DataGrid control. All you have to do is look for it.
Charlie
if(!curlies){ return; }
|
|
|
|
|
Charlie Williams: I definitely know about the datagrid control and that I have learnt thru this only. What I have asked is very much relevant.Actually there are many ways to do a thing. I am expecting a better way, that's why I have posted the qs. I want an efficient solution
|
|
|
|
|
|
In C# windows applications:
What's the use of BeginEdit/EndEdit when used with a datarow
|
|
|
|
|
HI, i would like to create dinamic tables for each user who is using my app, i cant do with create table #aux, is there anyway to create dinamics tables with differents name for each user?
Thanks
|
|
|
|
|
After adding/deleting/updating records in dataset table, when I try to click next, previous(any navigation button), I get the message "Cannot Create child list for field student.".
Why there is such error?
|
|
|
|
|
It is related to datagrid in C# windows applications
I have the following requiremnts:
1. Navigation of records in grid
2. add/delete,update records in the grid.
|
|
|
|
|
In C# Windows applications:
1. How can we create checkbox for an existing datagrid column i.e. datagrid column should act like a checkbox? In the same way, how can we create new data column as checkbox in datagrid?
2. Same requirement for Combo box?
|
|
|
|
|
1. How can I embed a non database column in the form of combo box to datagrid
2. How can I changed the datgird textbox column to act like combobox
|
|
|
|
|
It is related to Datagrid in C# windows Applications:
1. When a row is deleted from a datagrid, it should be removed from the grid as well as from the database.It gets deleted from database but still visible on datagrid. I used datagrid.refresh but it did not work?
How to do it?
Basically how to refresh a datagrid after insertion/deletion/updation of records
2. When I try to navigate the records in datagrid after deletion/addition/updation of row, I get the following error message:
"An Unhandled exception has occured in your application..........
Cannot Create a child list for field Test"
|
|
|
|
|
1. How do I prevent the datagrid from displaying its append row (the row at the end with an asterisk)?
2. How can I convert a Datagrid into dataview?
|
|
|
|
|
You asked this three times, were you expecting three distinct and different answers ?
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
NO, Actually there were some screen errors, so I thought it has not been posted and I keep on posting the same question 2 times more.
|
|
|
|
|
private BindingManagerBase bindingManager;
What is BindingManagerBase and what's the use of it?
|
|
|
|
|
In C# Windows application,How can I tell if the current row in a datagrid has changed ?
|
|
|
|
|
By using the property that exists to tell you that.
Dude, did you consider reading the MSDN before posting all these questions ? Or google ?
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
In C# Windows application,How can I tell whether I am on the AddNew row or not in a datagrid?
|
|
|
|
|
In C# Windows Applications,
How do I determine whether a checkbox in my datagrid is checked or not?
|
|
|
|
|
The following link may help answer your questions:
http://www.syncfusion.com/FAQ/WinForms/FAQ_c44c.asp
Thank you,
Jason W.
|
|
|
|
|
Hi all~
E.g "Select * from table_A where firstName Like '%" + string + "%'";
How to change the ad-hoc sql to prepared statement using operator 'like' and '%'?
Thanks
|
|
|
|
|
Not sure what you mean, but have a look at the sp_executesql stored procedure. That may point you in the general direction
Gregg
|
|
|
|
|
If using prepared statement,
The sql will like this:
cmd.CommandText = "Select * from table_A where firstName Like ?"
cmd.Parameter.Add("FirstName", "John");
cmd.Prepared();
cmd.ExecuteNonQuery();
Then if I would like to get the records which the firstName contains string "John". Using ad-hoc statement, "%" operator can be used. If using prepared statement, but to put "%" operator or using other way to achieve the result.
|
|
|
|