|
Thanks Judah. I will check that out.
|
|
|
|
|
Can anyone tell me how I can detect if an item is added/removed/changed in a listbox/combobox? As far as I can see there are no events raised when these changes occur, at least if it does not happen to a selected item.
|
|
|
|
|
yeah, you have to do this yourself, i do this in 2 ways, if i use lots of combobox in my app then i make a component class, inherit the combobox, make my own method that will add the items as well as raise an event too
2nd is useless infront of 1st, it can be use when i have one or 2 combobox
i call my desired method after Add() or Remove() to update it
i hope it will help
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
i add new database from add new item in visual studio 2005 and trying to insert data in table, i checked connection string, query every thing, but when i press insert button to add data it dont give me any error nor any data is inserted.
PLZ HELP ME
asd
|
|
|
|
|
Wow - what do you expect us to do for you based on that ? How are you trying to insert data ? What sort of database ? What is the connection string ?
For starters, I recommend reading the 'how to ask questions' sticky on the top of the forum.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
i m inserting in sql server express edition 2005 which i selected from add new item in visual studio 2005, i can view data in grid, but when i m trying to insert data it dont give me any error but it is not adding the data in table
SqlCommand admin_comm = new SqlCommand("insert into P_analysis values (@pid, @p_price, @p_date, @opd, @pdp, @rin, @rip, @ord, @p_name, @r_name)", admin_conn);
admin_comm.Parameters.Add("@pid", SqlDbType.Int);
admin_comm.Parameters["@pid"].Value = int.Parse(s1);
admin_comm.Parameters.Add("@p_price", SqlDbType.Int);
admin_comm.Parameters["@p_price"].Value = int.Parse(s2);
admin_comm.Parameters.Add("@p_date", SqlDbType.SmallDateTime);
admin_comm.Parameters["@p_date"].Value = s3 ;
admin_comm.Parameters.Add("@opd", SqlDbType.SmallDateTime);
admin_comm.Parameters["@opd"].Value = s4;
admin_comm.Parameters.Add("@pdp", SqlDbType.Int);
admin_comm.Parameters["@pdp"].Value = int.Parse(s5);
admin_comm.Parameters.Add("@rin", SqlDbType.VarChar);
admin_comm.Parameters["@rin"].Value = s6 ;
admin_comm.Parameters.Add("@rip", SqlDbType.Int);
admin_comm.Parameters["@rip"].Value = int.Parse(s7);
admin_comm.Parameters.Add("@ord", SqlDbType.SmallDateTime);
admin_comm.Parameters["@ord"].Value = s8;
admin_comm.Parameters.Add("@p_name", SqlDbType.VarChar);
admin_comm.Parameters["@p_name"].Value = s9;
admin_comm.Parameters.Add("@r_name", SqlDbType.VarChar);
admin_comm.Parameters["@r_name"].Value = s10;
admin_conn.Open();
admin_comm.ExecuteNonQuery();
admin_conn.Close();
asd
|
|
|
|
|
Wrap the whole thing in a try-except block and see what error you get, if you get any that is.
Your query isn't in the right format either.
Example: Table: RegistrationInformation Column: PlayerName
Query would be:
INSERT INTO RegistrationInformation (PlayerName) VALUES (@PlayerName)
NOTE: @PlayerName can be whatever you want it to be, this is how you reference it in SQLCommand.Parameters
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
I believe you can just specify values, but I agree it's not wise to do so.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Maybe, I am so used to doing it now it just looks weird without it. Now that I think of it I think you can as long as you understand that it will just start at the first column and goes as far as it can with the given information. And with that implementation I can see many issues
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
Expert Coming wrote: And with that implementation I can see many issues
Oh, I agree 100%. Better to say what you want, instead of hoping it works itself out.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
hhani wrote: int.Parse(s5);
NEVER do this. Use int.TryParse, so your code will never blow up.
I guess this means you can't use client tools to enter SQL direct to the DB and make sure the SQL works ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
It looks like you are just now starting a project... How could you possibly be at an emergency state yet? Your not even in production. We would love to help, but quite frankly, I, and probably most others could care less if you had an emergency or needed something urgently.
Now, give more information.
Is this a form, or web application?
What kind of database?
How about some sample code?
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
m inserting in sql server express edition 2005 which i selected from add new item in visual studio 2005, i can view data in grid, but when i m trying to insert data it dont give me any error but it is not adding the data in table
SqlCommand admin_comm = new SqlCommand("insert into P_analysis values (@pid, @p_price, @p_date, @opd, @pdp, @rin, @rip, @ord, @p_name, @r_name)", admin_conn);
admin_comm.Parameters.Add("@pid", SqlDbType.Int);
admin_comm.Parameters["@pid"].Value = int.Parse(s1);
admin_comm.Parameters.Add("@p_price", SqlDbType.Int);
admin_comm.Parameters["@p_price"].Value = int.Parse(s2);
admin_comm.Parameters.Add("@p_date", SqlDbType.SmallDateTime);
admin_comm.Parameters["@p_date"].Value = s3 ;
admin_comm.Parameters.Add("@opd", SqlDbType.SmallDateTime);
admin_comm.Parameters["@opd"].Value = s4;
admin_comm.Parameters.Add("@pdp", SqlDbType.Int);
admin_comm.Parameters["@pdp"].Value = int.Parse(s5);
admin_comm.Parameters.Add("@rin", SqlDbType.VarChar);
admin_comm.Parameters["@rin"].Value = s6 ;
admin_comm.Parameters.Add("@rip", SqlDbType.Int);
admin_comm.Parameters["@rip"].Value = int.Parse(s7);
admin_comm.Parameters.Add("@ord", SqlDbType.SmallDateTime);
admin_comm.Parameters["@ord"].Value = s8;
admin_comm.Parameters.Add("@p_name", SqlDbType.VarChar);
admin_comm.Parameters["@p_name"].Value = s9;
admin_comm.Parameters.Add("@r_name", SqlDbType.VarChar);
admin_comm.Parameters["@r_name"].Value = s10;
admin_conn.Open();
admin_comm.ExecuteNonQuery();
admin_conn.Close();
plz plz tell thankss
asd
|
|
|
|
|
Check the properties of your database (Right click the name of your database in Solution Explorer) and set the property of "Copy to output" to "Copy if newer".
If that doesn't work, manually copy your database and paste it in the debug folder of your project.
Hope this helps
|
|
|
|
|
Thanx alot ...... i wanna send u thankks card...
it really helpdd me
Again Thanx.. can i hav ur email Address
asd
|
|
|
|
|
Hi,
How can I retrieve the table name from a dataset after filling it..
DataSet1.Tables[0].TableName will always return "Table"
I have a feeling that this's only retrieving the table names set from the code using the same bloody property not the original names in the database
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
Muammar© wrote: I have a feeling that this's only retrieving the table names set from the code using the same bloody property not the original names in the database
You are correct, Sir! If you don't set this variable it will always return its default value. I suggest setting it in your data adapter when you initiate the table.
|
|
|
|
|
Im currently developing a webbrowser and need to know if anyone knows a way to detect all the RSS feeds a site has to offer without having to navigate to a specific XML page.
|
|
|
|
|
Check in the header of the page for any links to a file whose type="application/rss+xml". Check the header of this page for example and you'll see
|
|
|
|
|
Ok thanks. You can check the header in the webrowser control right?
|
|
|
|
|
Just found out that that black screen mode is actually a security mode to prevent other programs from hooking into uac when you enter passwords or something...
anyway to invoke this for other programs?
|
|
|
|
|
I have a dataGridView and as I am processing its rows - with a foreach (dataGridViewRow row in this.dg) I may be setting the visible property to false (based on some processing logic). It works for all rows execept the first row. All appropriate rows disappear from my grid except the first row. I first thought it had something to do with it being the current row, but I physically navigated off the first row and then pressed my process button and the first row still was displayed.
Here is the code that I am using to hide/display the row:
private void HideShowRow(DataGridViewRow row, bool visible)
{
CurrencyManager cm = (CurrencyManager)BindingContext[dgSTSimport.DataSource];
cm.SuspendBinding();
row.Visible = visible;
cm.ResumeBinding();
}
I stepped through my code and at the end of the loop, the visible property for the first row was false. As I was processing the second row and setting values for some of its cells, for some reason the visible property of the first row got set back to true (I kept the first row in my watch window). The only code that sets the visible property is the method above, and the debugger never stepped into that code while I was processing the second row, so I am at a loss as to why this is happening.
I put an intermediary fix in place to loop through all the rows in the datagrid a second time and reset the visible property based on the status of the row. That worked fine, but I do not want to have to loop through all the rows a second time if I do not have to.
Any ideas as to what I am missing?
|
|
|
|
|
Can anyone tell me how I can return an array of bitmaps?
I have declared Bitmap[] test = new Bitmap[30]
and tryed to fill it with test[length++]=b (length being initialized to 0, and b being the bitmap)
but the "test" array does not seem to hold the bitmaps, except the last one.
Can anyone point me if not, as to what I have to read to learn how. :S
|
|
|
|
|
AKXman wrote: have declared Bitmap[] test = new Bitmap[30]
and tryed to fill it with test[length++]=b
So, all your array elements ended up holding hte same bitmap ? This is not a value type, it's a class. Unless b is redefined every time, you will find they all point to the one bitmap, change one and you change them all, because there is only one, just 30 references to it
The Clone method of hte Bitmap class will work just fine for this, but you need to cast the result.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Thank You.
I tried bunch of things to keep the bitmaps, and I just happened to stumble upon the .Clone() option.
I don't understand why that works, but I will keep searching for an answer, some tutorial or a book ...
Thank You again.
|
|
|
|