|
Hi, can anyone tell me how to assign an autonumber to a record in SQL Server2000 database
can that be done in SQL database or do i need to write code in my application. if so, i need code in C#. as im making an ASP.NET web application using c#
thanx
|
|
|
|
|
If you need field to be auto number in sql server enterprise manager set identity to yes
MCAD
|
|
|
|
|
hi everybody.
Please I want anyone here to help me finding the right idea on how to establish session for file transmission using peer to peer technology and to let users connect to that session and begin receiving the file from one user connected in the same session any help of code or an article for that please !!!
Miss With The Best And Die Like The Rest
|
|
|
|
|
|
Hi im making a simple ASP.NET Web Application.with SQL Server 2000
to delete a record from the database, i use the following query
"delete from Temp1 where FirstName = '"+ TextBox1.Text + "';";
i get the following server error:
The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator.
what shud i do?
|
|
|
|
|
ashkitt,
You can use the ID (userId) or the related column right. Text comparisons are slower.
Also, one suggestion. Comparing against TextBox1.Text directly in a query is a potentially dangerous thing and that too in a Web Application, which I think would open doors for SQL Injection attacks.
You may like to move this into a Stored Procedure rather.
Vasudevan Deepak Kumar
Personal Web: http://www.lavanyadeepak.tk/
I Blog At: http://deepak.blogdrive.com/
|
|
|
|
|
Change the data type of the FirstName field to VarChar or NVarchar. You don't need a text or ntext field for this, FirstName should not exceed 4000 characters...(limit for the size of an nvarchar is 4000 unicode characters)
Don't arbitrarily make fields text,ntext or image type, since, as you have seen, they can't be compared... They are also substantially slower to retrieve as the always involve an extra level of indirection in the database.
Absolute faith corrupts as absolutely as absolute power
Eric Hoffer
All that is necessary for the triumph of evil is that good men do nothing.
Edmund Burke
|
|
|
|
|
Thanx Rob,
Problem solved )
|
|
|
|
|
I want to program an application that runs as a trayicon in the taskbar - I dont need any window.
But a notifyIcon seems to depend on an activ form so I don't get how to do it! Please help me...
|
|
|
|
|
You can always hide your form at startup, so the user would see only the taskbar icon. The other option is to run your own message pump using Application.Run , which is slightly more difficult to do.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
I know how to hide my App (you mean by setting visible to false, don't you?) - this is no difficult task but isn't my application using some more ressources of my computer? For that I don't need a window, the resources would be wasted. Maybe you (or anybody else) can give me a link for a tutorial or something else which explains how to build my own message pump as you proposed.
|
|
|
|
|
Dear all,
I have a database that contains numbers. I want to draw the Normal distribution graph for a column in my C# program and display it in a panel or a form (in whatever)
is there a way to do that?
thanks very much
|
|
|
|
|
mhmo
You may try to use a Graphing component, which exports as GIF and then embed that GIF into the panel.
It works like this:
<img src="graph.aspx?<regdparams>">
graph.aspx would be using the Graph component which plots the graph and exports it as GIF.
Vasudevan Deepak Kumar
Personal Web: http://www.lavanyadeepak.tk/
I Blog At: http://deepak.blogdrive.com/
|
|
|
|
|
I hope that u understand my question.
I will take the numvers from a database in one column and it is a form not a web page.
|
|
|
|
|
I have an application with multiple forms, and can't figure out how to make their variables and functions visible to one another. This is what I'd like to do:
<br />
namespace app1<br />
{<br />
<br />
public class Form1<br />
{<br />
public int state;<br />
private void btn_LoadForm_Click(...)<br />
{<br />
Form2 f = new Form2();<br />
f.Show();<br />
}<br />
public void SetState(int x)<br />
{<br />
state = x;<br />
}<br />
}<br />
<br />
public class Form2<br />
{<br />
private void Form2_Load (...)<br />
{<br />
Form1.SetState(1);<br />
}<br />
}<br />
<br />
Why doesn't this work? How do I make this work?
Thanks, -mutty
|
|
|
|
|
That doesn't work because Form1 is not an object, it's a class. You have to have a reference to the specific object to access non-static members of the class.
You can send a reference to the first form in the constructor of the second form:
Form2 f = new Form2(this);
Add a reference in Form2 and store the reference to the first form:
private Form mainForm;<br />
<br />
public Form2(Form mainForm) {<br />
this.mainForm = mainForm;<br />
}
Then you can reach the first form:
private void Form2_Load(...) {<br />
this.mainForm.SetState(1);<br />
}
---
b { font-weight: normal; }
|
|
|
|
|
I understand all this except the line:
this.mainForm = mainForm;
Do I need to declare a form mainForm in form2?
|
|
|
|
|
The line takes the reference to Form1 and stores it in the private variable.
"this.mainForm" refers to the private variable in the Form2 class. "mainForm" refers to the parameter that you send to the constructor.
---
b { font-weight: normal; }
|
|
|
|
|
Thank you very much for the assistance. I have it working now! -mutty
|
|
|
|
|
Hi, all,
I use below command to get X drive to be mapped. I get the drive but it is not actived. I need to double click on it to make it active. Is it possible to make it active in the programs.
string strCmdLine;
strCmdLine = "/C net use X: \\\\locla01\\d$ \"******\" /user:coby";
System.Diagnostics.Process.Start("CMD.exe",strCmdLine);
I appreciate your help.
Thanks.
coby
coby
|
|
|
|
|
Hello everybody
Can you please tell me how can i start the explorer search engine from within a c# program... say.. when i press a button...just as if i would press
start\search\For Files or Folders...
please help me... thx
|
|
|
|
|
|
Hope this helps... thank you.
|
|
|
|
|
Hi,
Is there a way to make NumericUpDown controls unlimited in the number that's allowed to be entered? I think the default maximum is 100.
Thanks,
Yigal
|
|
|
|
|
Unlimited is not possible, how could a computer store unlimited numbers?
The NumericUpDown uses the "decimal" datatype, which has a maximum value of 79228162514264337593543950335.
Set the Maximum property of the NumericUpDown control to the value you want to use.
|
|
|
|