|
Make sure you have not kept the ID as the primary key , as primary key may not be updated...
But I am not that damn sure...
But I havent came across such .....
Now for this its better to use a better way to code...
This should be something like this...
I am writing for SQL but its similar for OLE DB...
SqlCommand cmd = new SqlCommand();
cmd.Connection = cn; //Anything you have as SqlConnection object
cmd.CommandText = "Update Membership SET UserID = @UserID";
cmd.Parameters.AddWithValue("@UserID",txtuserid.Text);
int R = cmd.ExecuteNonQuery();
cn.close();
|
|
|
|
|
hi there,
a want to write a simple program that can do auto-Completion in word or notepad, but i don't have an idea of where to start with the auto-Completion, can anyone point me to an article or beter yet tutorial ?
thank's in advance .
|
|
|
|
|
here[^]
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)JKQUFK[M`UKs*$GwU#QDXBER@CBN%
R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
-----------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Hi! You have all seen the word games, which have a grid of letters and you need to find the words.
I've managed to make a program which seeks the grid and finds words, and then compares them to a list of actual words. The problem is that it's too slow. I saw a Dictionary class included int the .NET framework but can I use it for this purpose? And is there any built in class that can be used for a rapid search in a big list??? If not maybe I'm going to have to write my own search method.
The process of searching is done via a BackgroundWorker. If I close the application while the worker is searching will it dispose of the separate thread, or I have to stop it manually??? Once when I experimented with the BackgroundWorker, I closed the application and later it showed me a message saying "Done!"(I made the worker show a message box when it is done working).
Thanks!
Still learning...
|
|
|
|
|
nike_arh wrote: and then compares them to a list of actual words. The problem is that it's too slow.
You'll need to manage any threads you generate, otherwise the process will remain alive.
nike_arh wrote: The process of searching is done via a BackgroundWorker. If I close the application while the worker is searching will it dispose of the separate thread, or I have to stop it manually???
Are you simply running a linear search into a list of thousands of words? If so, I'm not surprised. Thousands of byte-wise comparisons will take a fair while when conducted hundreds of times. If the data is sorted then try running a binary search based on the first few letters. If not try sorting it and building an index into your list.
nike_arh wrote: I saw a Dictionary class included int the .NET framework but can I use it for this purpose?
Dictionary's are handy for associating two lists of information together, namely a key (which must be unique) and a value corresponding to that key. I use them for lookup information all the time such as translating a numeric value into a displayable string.
10110011001111101010101000001000001101001010001010100000100000101000001000111100010110001011001011
|
|
|
|
|
Hi,
Threads are either forground or background threads, see their IsBackground property; the difference is each running foreground thread prevents an app from exiting, background threads don't. BackgroundWorker is basically a background thread.
Have a look at HashSet< T> class.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
Hi,
iam in Developing Desktop application using c#..
i have to print data in Invoice Format. In MSDN i saw about "TabularReport" to print data in Invoice Format.
can anybody give information how can i desing "TabularReport" ?
how can i bind data into TabularReport ?
Thanks in Advance..
murali krishna
|
|
|
|
|
Hi, I programing tapi 3.0 c#, already downloaded the source example from this site, but I'm not succeed to get events from the call. My purpose is to control devices using a phone and computer,
there for when number is pressed I need any event to occur.
The link of the source code:
http://www.codeproject.com/KB/IP/devangpro.aspx[^]
I think that the problem can be in these lines:
TAPI3Lib.ITTAPIEventNotification_EventEventHandler(cn.Event);
tobj.EventFilter=(int)(TAPI_EVENT.TE_CALLNOTIFICATION|
TAPI_EVENT.TE_DIGITEVENT|
TAPI_EVENT.TE_PHONEEVENT|
TAPI_EVENT.TE_CALLSTATE|
TAPI_EVENT.TE_GENERATEEVENT|
TAPI_EVENT.TE_GATHERDIGITS|
TAPI_EVENT.TE_REQUEST);
or in:
public void Event(TAPI3Lib.TAPI_EVENT te,object eobj)
{
switch(te)
{
case TAPI3Lib.TAPI_EVENT.TE_CALLNOTIFICATION:
addtolist("call notification event has occured");
break;
case TAPI3Lib.TAPI_EVENT.TE_DIGITEVENT:
TAPI3Lib.ITDigitDetectionEvent dd =
(TAPI3Lib.ITDigitDetectionEvent)eobj;
addtolist("Dialed digit"+dd.ToString());
break;
case TAPI3Lib.TAPI_EVENT.TE_GENERATEEVENT:
TAPI3Lib.ITDigitGenerationEvent dg =
(TAPI3Lib.ITDigitGenerationEvent)eobj;
MessageBox.Show("digit dialed!");
addtolist("Dialed digit"+dg.ToString());
break;
case TAPI3Lib.TAPI_EVENT.TE_PHONEEVENT:
addtolist("A phone event!");
break;
case TAPI3Lib.TAPI_EVENT.TE_GATHERDIGITS:
addtolist("Gather digit event!");
break;
case TAPI3Lib.TAPI_EVENT.TE_CALLSTATE:
TAPI3Lib.ITCallStateEvent a=
(TAPI3Lib.ITCallStateEvent)eobj;
TAPI3Lib.ITCallInfo b=a.Call;
switch(b.CallState)
{
case TAPI3Lib.CALL_STATE.CS_INPROGRESS:
addtolist("dialing");
break;
case TAPI3Lib.CALL_STATE.CS_CONNECTED:
addtolist("Connected");
break;
case TAPI3Lib.CALL_STATE.CS_DISCONNECTED:
addtolist("Disconnected");
break;
case TAPI3Lib.CALL_STATE.CS_OFFERING:
addtolist("A party wants to communicate with you!");
break;
case TAPI3Lib.CALL_STATE.CS_IDLE:
addtolist("Call is created!");
break;
}
break;
}
}
}
Thanks for any help or advise.
|
|
|
|
|
how to Get label text value from ID in C#
Let give the example first
Inside the body tag
<asp:Label id="Label1" runat="server" Text="Hello world"/>
Inside the script tag using c#
void Page_Load(Object Source, EventArgs E)
{
String test = Label1.Text
}
OK, thats the normal method.
But my problem is I have many Label.
Lets say Label1 until Label10 and I want to get the label value by using loop
Example: hope this kind of code exist, note that getLabelID is not a funtion or even exist, its just something that can get the Label based on its id where the parameter is a string. Is this thing exist?, if not any one have a solution?
void Page_Load(Object Source, EventArgs E)
{
for(int aa=1; aa<=10; aa++)
{
String test = getLabelID("Label" + aa.toString()).Text;
}
}
|
|
|
|
|
Loop round the controls in the page instead - you can use the if (control is Label) check to ensure that the object you've found is a control and you can retrieve the properties of the label by casting the control accordingly, i.e. ((Label)control).Text
HTH
It definitely isn't definatley
|
|
|
|
|
asipo wrote: Is this thing exist?
yes...FindControl() but you have to convert it to Label e.g (Label)FindControl()
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)JKQUFK[M`UKs*$GwU#QDXBER@CBN%
R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
-----------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Thanks Xmen.
Here the solution, basically from him.
This is to change the Label99 text from "Hello world" to "My world"
Inside the body tag
<asp:Label id="Label99" runat="server" Text="Hello world" />
Inside the script tag using c#
void Page_Load(Object s, EventArgs e)
{
Label test = new Label();
test = (Label)FindControl("Label99");
test.Text = "My world";
}
|
|
|
|
|
Hi,
I'm trying to get all Files form the Soltion Explorer in Visual Studio.
I'm searched the internet and it found sometthing like that:
EnvDTE80.DTE2 dte2;<br />
dte2 = (EnvDTE80.DTE2)System.Runtime.InteropServices.Marshal.GetActiveObject("VisualStudio.DTE.9.0");<br />
MessageBox.Show(dte2.Solution.FullName, "ok Solution");
The prblem is, that it isn't returnig the Soltion of the current Project but the Solution of the Project where I'm making the VSX programm... And I have no Idea why
|
|
|
|
|
Does anyone have a favourite or know of a solid commercially available TCP/IP library / set of tools for socket based TCP/IP communications?
Thanks in advance for your feedback!
|
|
|
|
|
What exactly do you need it for? What does it need to do? There's a lot of stuff for that already in .NET..
|
|
|
|
|
I am writing an application that communicates with remote display units - I have a working sychronous system - but the error handling, speed and other aspects could be improved upon. The messaging is simple open socket, send text, close socket - I am looking to make it more robust, increase the speed, and perhaps receive more diagnostics on the errors - Also thinking of making it asynch
All without doing a pile of research and coding - if possible.
|
|
|
|
|
I think that should be possible with a NetworkStream , just keep it open, you'd have to delimit messages in some way - such as prefixing them with their length.
|
|
|
|
|
The remote sign is not under my control - that is it is the server and I am the client.
I can only request a socket connection, and after connecting, send a message, and wait for a response ... there are multiple devices and only one of my app.
Thanks for your help -
|
|
|
|
|
Ok bad luck, however you could still queue the messages in your program and send them from an other thread, and do something nice with the response, there are plenty of ways to handle that - events, callbacks, put them on a queue to be handled, a combination of queuing and events/callbacks etc..
To improve efficiency (by reducing locking) you could use double-queuing, or use the thread safe queue that comes with the new ParallelFX if you're allowed to use it.
|
|
|
|
|
There's the .NET Framework , why do you need more?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi,
I've built an application that downloads with no problem a web. The next step is to convert it to PDF. To do this, there are some approaches: iTextSharp, a virtual printer, via command line...
The problem is, that my HTML is a dynamic HTML, and when I preview the download web in my browser, it doesn't have style information, photos.. and so on. So, the future PDF will lack these too. All "src" and "href" tags are relative to the original url. How to modify the downloaded web to convert it properly to PDF?
Thanks in advance.
Regards
|
|
|
|
|
Hi all,
How do i able to Read the html tag
And after that, i can chage the html tag content?
How do i read all the tag that contain with
How are you?
How can i replace the "How are you? to other type of text ? like "GFHSDFGR" (junk word)?
Thank You
|
|
|
|
|
First step: try to teach yourself English.
Second step: go to the store and buy a book about basic programming
Third step: read the book, don't scan the text, but really read it
Then you're ready to program.
If you have an error, then go to google and try to search your error.
If you tried for 15 minutes, then, but ONLY THEN come here and ask your questions.
To anwser your question: try to use the String class for this.
If you have your text stored in a String, for instance like this: String s = "<html><body>Hello World</body></html>" and you would like to read the tags, use a parser or make your own parser.
To replace "How are you?" to "GFHSDFGR", you should try: "Hello How are you?".replace("How are you?", "GFHSDFGR"); , this will give as output: Hello GRHSDFGR.
Good luck.
|
|
|
|
|
Click the "Ignore HTML" checkbox, to stop your message going nuts
|
|
|
|
|
if you mean html parser you can see
this[^]
or
this[^]
as reference
hope it helps
dhaim
ing ngarso sung tulodho, ing madyo mangun karso, tut wuri handayani. "Ki Hajar Dewantoro"
in the front line gave a lead, in the middle line build goodwill, in the behind give power support
|
|
|
|