|
Thats not my homework I am trying to learn web services but unable to understand it and even not able to execute it thats why u asked for help.
|
|
|
|
|
Hi,
I'm using the DataGridView in c#.NET 2.0 The DataSource is a Generic List
of a custom class0: lstMyPersonnes = New List(Of clsPersonne).
When I add a new clsPersonne to lstMyPersonnes, and rebind the
lstMyPersonnes to my DataGridView.dataSource, it shows the new record in
the DataGridView as it should be.
But when I click on a cell of that row, I suddenly got this error: "Index -1
does not have a value"...
Does anybody has any idea how to get around this problem?
Thanks a lot in advance,
john
|
|
|
|
|
Firstly ,did you add event this datagridview?For example,if you add a combobox colomn and add an event ,whenever you click a button or any cell in this row and then event will be occur.when you click cell header ,this event return -1 .If you describe your fault in detay ,anybody can help you about your problem...
|
|
|
|
|
I am re-writting a powerbuilder application in C#. I need a code that perform FTP. Where can I get it.
|
|
|
|
|
Please at least try to use the search function: ftp[^].
|
|
|
|
|
If you are working in .Net 2.0 then see FtpClient class in MSDN. It's very easy to work with a few lines
Cheers!!!
|
|
|
|
|
the company I work wants to use NHibernate as a OR mapper. I know nothing about it. The application will be a rewrite of a web solution using C#.
I've read that there is not much good documentation. Is this true?
Where could I get a simple sample app?
Any help suggestions is apprecriated!
|
|
|
|
|
Google is your friend.
The second hit in this search[^] will help you.
|
|
|
|
|
Hi guys,
I have an application that uses a few tables and a few store procedure for it's functioning. Is there any way I can automate creation of these tables and store procedures within my application by directing it to a certain database on SQL server?
Please advice.
sasa
|
|
|
|
|
If the database already exists you can always connect to it and run your table and stored proc creation scripts with ExecuteNonQuery.
|
|
|
|
|
Got it, thank you very much
sasa
|
|
|
|
|
say you have
create procedure dbo.GetUsers
@Enabled bit
as
select * from tUsers where enabled = @Enabled
now that above code can be set as the command text and which ever database you set as the intial db will have this code executed and a stored procedure call GetUsers will be created.
So if you create a function that loads an .Sql file and reads it, then tells the sqlcommand to execute the code returned from the sql file, which ever database you set as the intial database will have a new table or stored procedure.
Gav
|
|
|
|
|
Hi.i am try to write update statement using classes but it always gives me an error and use this on my form.i did something like this.
public class Update
{
string empname = "";
public Update()
{
//
// TODO: Add constructor logic here
//
}
public void updateEmployee(string empname1)
{
empname = empname1;
SqlConnection conn = new SqlConnection();
conn.ConnectionString = "integrated security=SSPI;initial catalog=Employee;server = za211149;persist security info=False";
conn.Open();
try
{
SqlCommand UpdateEmp = new SqlCommand();
UpdateEmp.Connection = conn;
UpdateEmp.CommandText = "UPDATE jakes";
UpdateEmp.Parameters.Add(new SqlParameter("@empname",System.Data.SqlDbType.VarChar,50,empname));
UpdateEmp.Parameters["@empname"].Value = this.empname.ToString();
if(UpdateEmp.ExecuteNonQuery()==1)
{
MessageBox.Show("record updated");
}
else
{
MessageBox.Show("record not updated");
}
}
catch
{
MessageBox.Show("o a gafa");
}
finally
{
conn.Close();
}
}
-- modified at 9:03 Wednesday 19th July, 2006
|
|
|
|
|
You don't have a proper UPDATE statement. It should be in the form
UPDATE jakes SET [field_name] = @empname
Remember to have a where clause also, unless you want all records updated with this value.
WHERE id = @id
|
|
|
|
|
Mamphekgo wrote: UpdateEmp.CommandText = "UPDATE jakes";
if i'm not wrong you are missing the SET keyword. The above mentioned line should be like this:
UpdateEmp.CommandText = " UPDATE jakes SET
Regards.
_____________________________
Success is not something to wait for, its something to work for.
|
|
|
|
|
Hi all
when I was discovering Visual studio .Net 2005, I tried to put about 50 buttons on a form and run the application, but I had got a strange behavior, that is the buttons started to be painted one after another making a feeling of flicking, I tried to many ways to overcome this by using double buffering but still got the problem
??????????
|
|
|
|
|
In such cases you must create custom control with owner draw.
My english is not so good. Please, correct my errors.
Best regards, Alexey.
|
|
|
|
|
I tried to this
I did my own button class that derived from class button and changed its behavior using setStyle Method to enable double buffering and user paint and allPaintingInWMpaint, I did all of this in the constructor of my class but I didn’t overrides the OnPaint Method
And still got the problem
If u don’t mind, can u give me what u advised me in a sample code?
Thx
|
|
|
|
|
I think he meant something different. Instead of creating x separate controls implement on user control which paints all buttons together and also handles the mouse events etc for himself.
ControlPaint.DrawButton will help you doing this.
|
|
|
|
|
Maybe its a system resource issue. I have seen window draw controls individual after heaving thrashing so it is a possibility. 50 buttons could be considered a lot on some systems.
A man said to the universe:
"Sir I exist!"
"However," replied the Universe, "The fact has not created in me A sense of obligation."
-- Stephen Crane
|
|
|
|
|
|
Build the exe of the application and execute it.
Pramod
|
|
|
|
|
Many Thx
Yes this works for release version and run in good state from outside the IDE
|
|
|
|
|
When we have to use arraylist & hashtable?
Mallikarjun
|
|
|
|
|