|
Glen Harvy wrote: Be easier to convert the field to text and record Yes or No
Yes, but that would suck as far as the database is concerned, especially if you ever filter on this field.
You could just write a combobox that renders the words Yes/No based on a bool property.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Christian Graus wrote: You could just write a combobox that renders the words Yes/No based on a bool property.
I guess we're getting back to where we started
Glen Harvy
|
|
|
|
|
Sort of, but now I'm advocating an approach that doesn't change the data layer at all. Just have a control that renders whatever text you set based on a bool property.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
hi
i am create dataset in dataset designer and fill my dataset with GetData method that was created in dataset designer but when i create insert or update or delete method from add query in dataset designer and use it nothing works .(insert - update - delete methods not work) how to solve my problem ? and can u take me an article that use tableAdapter in vs2005 with source code ?
thanks...
|
|
|
|
|
Hi guys,
I need some help please, I have a listbox with a few rows filled, I am trying to create one string with all data in the list box and adding that string to the database table.
while(lbSelBranches.SelectedItems.Count!=0 || lbSelBranches.Items.Count!=0)
{
lbSelBranches.SelectedIndex=0;
lbSelBranches.Items.Remove(lbSelBranches.SelectedItem);
}
I have the above code, I need help figuring out how to keep inserting data into one string and than outputting in one line the string data, i.e. insert the string into one field of the database.
Please help
sasa
|
|
|
|
|
SASA_1 wrote: how to keep inserting data into one string
Sounds like you want a stringbuilder ?
SASA_1 wrote: insert the string into one field of the database.
Well, once it's a single string, you'd do that in the normal way.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
hi
im trying to develop an application P2P file sharing (like eDonkey) and instant messaging.
what tecnologies should i use? Web Services, RPC, XML or something like that.
i know C++ and Delphi and Multithreaded, Socket programming but im new at C# and Microsoft .NET technologies.
please help me, really i don't know where to start!
thank you.
asamay MCSE
|
|
|
|
|
Hello everyone, I'm having a little trouble programming for a hand held device.
What I would like to do is pull some data back from a sql server located on a computer (while the handheld is in the cradle). But I can not seem to use the following command:
Using System.Data.SqlClient;
anyone have any ideas? Did I perhaps miss some setup files or something?
|
|
|
|
|
Have you made sure that you've added the reference to the Sql dll stuff thingy ma bob in the project?
As of how to accomplish that have you ever tried Google?
Failing that try .
|
|
|
|
|
How exactly do I go about doing that?
|
|
|
|
|
Solution Explorer -> Right click References -> Add Reference under .NET add the one that deals with Sql Stuff, might be system.data.dll or something similar.
As of how to accomplish this, have you ever tried Google? Failing that try
|
|
|
|
|
If I do a:
Using System.data
the only options I can select are: Common, and SqlTypes
|
|
|
|
|
Do you have System.Data in your references?
As of how to accomplish that have you ever tried Google?
Failing that try .
|
|
|
|
|
|
Have you checked to see if the classes you're trying to use are supported by the CF?
|
|
|
|
|
I have code to serialze to a stream but I just want the xml as a string variable. Anyone know how to do that?
how vital enterprise application are for proactive organizations leveraging collective synergy to think outside the box and formulate their key objectives into a win-win game plan with a quality-driven approach that focuses on empowering key players to drive-up their core competencies and increase expectations with an all-around initiative to drive up the bottom-line. But of course, that's all a "high level" overview of things
--thedailywtf 3/21/06
|
|
|
|
|
One way would be to write it to a memory stream, and get a string from the bytes written.
---
b { font-weight: normal; }
|
|
|
|
|
I have a DataGridView object to which I enter objects in the Tag property for all the cells in a column. It works when I look at the object in the debugger just before activating the form on the screen. Then if i capture the event Click on the cells, all cells Tag objects are null ? Makes no sense to me.
|
|
|
|
|
I found the answer myself if this can help someone else. Apparently the Tag objects must be filled when the form is already activated. Still don't understand why but it works now!
|
|
|
|
|
I am trying to call a oracle stored procedure and can't get it work. I am not sure how to call this from c#.
C#:
[CODE]
OracleParameter ps1 = new OracleParameter("cryst_rep.ref_cur_type", OracleType.Cursor);
ps1.Direction = ParameterDirection.Output;
OracleParameter[] param = { ps1 };
ahpDataSet = aDataBase.ExecuteDataSet("ReconcileHardm", param);
[/CODE]
Oracle stored proc looks like this:
create or replace PROCEDURE ReconcileHardm(io_cursor IN OUT portfolios.cryst_rep.ref_cur_type) IS
tmpVar NUMBER;
BEGIN
-- Join the two temp tables and do the reconciliation
OPEN io_cursor FOR
SELECT FAS133.DEAL, HEDGES.HEDGE_DEAL, FAS133.MTC_MV, HEDGES.Instrument_MV, FAS133.HEDGE_MV, HEDGES.HEDGE_MV,
FAS133.MTC_CURRENT_PAR,HEDGES.INSTRUMENT_PAR FROM TEMP_FAS133_MAIN_COPY FAS133 INNER JOIN TEMP_HEDGES_MON_f HEDGES
ON FAS133.DEAL = HEDGES.HEDGE_DEAL
WHERE FAS133.HEDGE_MV<>HEDGES.HEDGE_MV OR FAS133.MTC_CURRENT_PAR<>HEDGES.INSTRUMENT_PAR
OR FAS133.MTC_MV <> HEDGES.Instrument_MV ORDER BY DEAL;
--io_cursor := v_cursor;
END ReconcileHardm;
|
|
|
|
|
i want to make remote connection to mySQL Database ??
what the best method to do that ...0...
Palestine
|
|
|
|
|
I've been using generic collection classes in the .net 2 framework for some time, but came across a problem that I thought might be solved by a generic method.
I have a combo box that contains ints representing enums as well as the localized text version of that particular enum.
I use a utility method to load those combos based on the name of the enum list, I just pass a combo and a name for the list and the rest is automatic.
Now I want to do the same in reverse with the selected value, so I thought rather than handling each enum in my form code I'll write a general purpose util method, pass it a combo box and an enum type and it will magically return the selected enum of the correct type for storing in my business object.
Seeing as how this will work normally (where DayOfWeek is an int enum):
DayOfWeek d=(DayOfWeek)nIntValue;
I thought, ok, how about a method that uses generics for all enum based combo box
value retrieval and tried this:
static public T Test<t>(RadComboBox cb, T enumtype)
{
return cb.Value as T;
//Or return (T) cb.Value; //doesn't work either
}
but the compiler choked on it:
The type parameter 'T' cannot be used with the 'as' operator because it does not have a class type constraint nor a 'class' constraint
I'm guessing it's just not possible to cast that cb.Value (which is an int btw) back to the original enum value...or is it?
|
|
|
|
|
This compiles fine so I suspect the "type"of RadComboBox.Value
enum foo { Bar, Other };
private foo testfoo(int n)
{
return (foo)n;
} Oh Generics, sorry, nevermind.
Last modified: 16mins after originally posted -- I'm a moron
led mike
|
|
|
|
|
led mike wrote: Last modified: 16mins after originally posted -- I'm a moron
Yeah, exactly what I want to replicate only using generics. I've pored over every doc I can find on Generics but I guess I'm just trying to do something that isn't allowed.
|
|
|
|
|
Try using Enum.Parse , for example:
public class Class<T>
{
public static T GetValue(ComboBox cbxControl)
{
return (T) Enum.Parse(typeof(T), cbxControl.SelectedText);
}
}
I would suggest though putting some wrappers around this for error checking/catching/etc.
Hope that helps.
|
|
|
|