|
Hi,
You can make use of OLEDB connection.(Microsoft.Jet.OLEDB.4.0)
so that u can access sheet with SQL Query.
like select * from [sheet1]
Hope this could help you,
Regards
Surender
No Defeat Is Final Until You Stop Trying!.......
|
|
|
|
|
Hi surender
thanks for reply, actallu i m doing same way
try and try untill reach success..
|
|
|
|
|
hi,
i have two forms and i m changing text of a control on second form from first form through a static property.now i show the second form but the text doesnt changes.wat is wrong?
|
|
|
|
|
Can you show your code?
Its difficult to tell what is wrong without seeing your code.
|
|
|
|
|
Post code or elaborate your question (preferably the first one ).
|
|
|
|
|
There could be so many things wrong, it is impossible to be definite. However, the first question for you is: why are you using a static property? You do realise that it is shared by all instances of the form?
Try using a public property on Form2, and use it in the form load event:
public string myText { get; set; }
...
private void Form2_Load(object sender, EventArgs e)
{
label1.Text = myText;
}
Then in Form1:
Form2 myForm = new Form2();
myForm.myText = "Hello World!";
myForm.Show(); If this doesn't solve your problem, then you will have to post relevent code fragments from Form1 and Form2 (enclosing in <pre>...</pre> blocks with the "code block" widget to preserve the formatting and make it easier to read) - don't just post your entire project, nobody wants to wade through loads of irrelevant code!
You should never use standby on an elephant. It always crashes when you lift the ears. - Mark Wallace
C/C++ (I dont see a huge difference between them, and the 'benefits' of C++ are questionable, who needs inheritance when you have copy and paste) - fat_boy
|
|
|
|
|
thanx all problem solved...
|
|
|
|
|
actually the form2 was getting disposed before setting its control's text...
|
|
|
|
|
Oops.
You should never use standby on an elephant. It always crashes when you lift the ears. - Mark Wallace
C/C++ (I dont see a huge difference between them, and the 'benefits' of C++ are questionable, who needs inheritance when you have copy and paste) - fat_boy
|
|
|
|
|
you can use delegation to solve your problem
EASY COME EASY GO
|
|
|
|
|
Hi..
I try to insert 2 textbox text in one field but i face a problem please help me
my code is
SqlConnection conn = new SqlConnection(connString);
string v_query = "insert into voucher_2 (heads,credit,debit,descp,vdate) values('" + partyname.Text + "',' 0 ','" + Amount.Text + "','" + qty.Text && rate.Text + "','" + Date.Text + "')";
SqlCommand cmd = new SqlCommand(v_query,conn);
try
{
conn.Open();
cmd.ExecuteNonQuery();
MessageBox.Show("Record Inserted.");
}
finally
{
conn.Close();
}
Error IS
perator '&&' cannot be applied to operands of type 'string' and 'string'
|
|
|
|
|
Ofcourse, && is Logical AND operator.
You can use + operator to combine two strings.
|
|
|
|
|
What are you trying to acheive?
If you want to concatenate two strings, then use the '+' operator.
qty.Text + rate.Text
|
|
|
|
|
Thanks For Good And Fast reply
|
|
|
|
|
How to create spaces between them???
|
|
|
|
|
qty.Text + " " + rate.Text
|
|
|
|
|
qty.Text + " " + rate.Text
|
|
|
|
|
how to use brain cells?
how to read book?
how to ask questions?
|
|
|
|
|
try declaring a string variable and pass the value of two textbox.text in the declared variable...
string strTxtVal = "";
strTxtVal = qty.Text + rate.Text;
|
|
|
|
|
Dear friends ,
I have Problem like these ...
i have C++ dll which returns "unsigned char *" - this contains image data
now i want that to be converted to c# "byte[]"
how to do that???
thank you
|
|
|
|
|
|
Dear friend
thank for the reply
and few clarification,
"unsigned char *" is a pointer array and is it possible to assign to simple char[] of c# without any address as such ??
unsigned char* buffer = new unsigned char[xSize*ySzie]; //Type in C++
byte[] ImageData =buffer; //C#
throws error as "Cannot implicitly convert type 'byte*' to 'byte[]",
do i need to change byte[] ImageData to byte[]* ImageData
Thank you
|
|
|
|
|
|
Hi,
you can't convert an unsigned char * (or any other pointer) to a byte[] or any other kind of array, as an array has a length which is not available when all you have is a pointer.
the easiest way to transfer an array of elements between managed and unmanaged worlds is by having the managed world create the array and the native side to read/write said array. Which means the array's size must be known beforehand, and the array should be passed as a parameter.
|
|
|
|
|
I have a web address which when run in a web browser returns a xml file.
i need to save that file as xml format.
i have tried using webclient.downloadfile method but its not saving the full file, it only saves two lines.
please if any one can explain how to do it.
|
|
|
|