Hello Rajesh, Thanks a lot, this works fine. I have been working for at least two weeks on this problem and now within two hours you solved my problem. Regards, Bas
keninfo
Posts
-
Sending ascii extended characters via serial port [modified] -
Sending ascii extended characters via serial port [modified]I tried, but it doensnt work :(
-
Sending ascii extended characters via serial port [modified]Hello Rajesh, Thanks for your answer. I tried but when i send the character instead of Hex then i stil have to use an other character set, because hex97 = character 151. Standard ascii set starts at 0 and ends at 127. Extended ascii character set starts at 128 and ends at 255. As i have to send hex97 or character 151 i guess i have to change the character set but i do not know how and to which character set. Regards, Bas
-
Sending ascii extended characters via serial port [modified]Hello, I am making an application which can control a pabx (telephone switch). I connect my pc and the pabx via com port. For the connection setup i have to send some characterlines to the pabx. Sending normal ascii characters works fine. I use: SerialPort.WriteLine(Chr(&H10) & Chr(&H2) & Chr(&H20) & Chr(&H2) & Chr(&H0) & Chr(&H10) & Chr(&H3)) However, i have to send also hex97 (for example). Is there someone who can give me some information. I guess i have to change the character set? But how? Regards, Bas
modified on Saturday, April 5, 2008 6:12 AM
-
catch Run-time error 40006 (VB6.0)Hello Dave, Thanks for the information. The situation is as follow: I am making a tool which checks a range of portnumbers. I made a listener tool, which listens on the portnumbers, and a tool which tries to communicate on the portnumbers. One by one. I am using a textbox to show a portnumber is open or closed. When a portnumber is closed (by a firewall or something else) the 40006 error is shown. But i am not sure if error 40006 only pops if a portnumber is closed or also in other situations. Regards, Bas
-
catch Run-time error 40006 (VB6.0)Hello, Is it possible to catch errors like Run-time error 40006 in Visual Basic 6.0? So i can write my own error message. Thanks. Bas
-
BindingContext???Hello all, Here's my situation: I have a form with a listbox and a textbox, both related with the same collumn of a databasetable. When i click an item in the listbox i want the textbox to show the item as well. I tried the following code in the click event of the listbox: Me.BindingContext(dsGroepAgent, "groep").Position = lstgroepen.SelectedIndex When i click an item in the listbox the following error occured: An unhandled exception of type 'System.StackOverflowException' occurred in System.Windows.Forms.dll Any idea?
-
SelectedIndexChanged click item listbox databaseHello all, Here's my situation: I have a form with a listbox and a textbox, both with the same collumn of a databasetable. When i click an item in the listbox i want the textbox to show the item as well. I tried the following code: Me.BindingContext(dsGroepAgent, "groep").Position = lstgroepen.SelectedIndex When i click an item in the listbox the following error occured: An unhandled exception of type 'System.StackOverflowException' occurred in System.Windows.Forms.dll Any idea
-
Update Table gets message "parameter has no default value"Hello Dave, I tried, it works fantastic. Thanks guru!!
-
Update Table gets message "parameter has no default value"Hello Dave, Thanks for the tip. Now i get it. I wil try this.
-
Update Table gets message "parameter has no default value"Hello all, I am cracking my brains for two weeks now on the following problem: I have to update records on a table but i am now in the stiuation that i get the message "parameter @NummerNaam has no default value" I have posted this question once, thanks for the tips. I also read several documentation but still get stuck. Below my code. Thanks, Bas Dim command As System.Data.OleDb.OleDbCommand = New System.Data.OleDb.OleDbCommand("Update Agent" & _ " SET Nummer_Naam = @NummerNaam, Agentnummer = @AgentNummer, Agentnaam = @AgentNaam" & _ " WHERE(Agentnummer = @agentNummerOud)", dcAgent) command.Parameters.Add("@NummerNaam", OleDb.OleDbType.VarChar, 20, "Nummer_Naam") command.Parameters.Add("@AgentNummer", OleDb.OleDbType.Integer, 10, "Agentnummer") command.Parameters.Add("@AgentNaam", OleDb.OleDbType.VarChar, 20, "Agentnaam") Dim parameter As System.Data.OleDb.OleDbParameter = command.Parameters.Add( _ "@agentNummerOud", OleDb.OleDbType.Integer, 10, agentNummerOud) parameter.SourceVersion = DataRowVersion.Original command.Connection.Open() command.ExecuteNonQuery() command.Connection.Close()
-
Explanation Parameterised QueriesThanks for the reply, Ok, can i use it like this? command.Parameters.Add("@AgentNaam", OleDb.OleDbType.VarChar, 20, txtAgentNummer.Text) If so, why is my table not updated after? parameter.SourceVersion = DataRowVersion.Original daAgent.UpdateCommand = command daAgent.Update(dsAgent)
-
Explanation Parameterised QueriesBut i don't know what @AgentNaam corresponse with, it should be a parameter, i guess. Can you explain the following command.Parameters.Add("@AgentNaam", OleDb.OleDbType.VarChar, 20, "AgentNaam") I need to update a table with new values, which are inserted via textfields. I don't get the way from textfield inserting till the actual update I know, it seems stupid that i cannot manage this. But i need some help to start.
-
Explanation Parameterised QueriesIs there anyone who can explain Parameterised Queries. I don't get it where the parameters are related to. How do i write an Updatecommand with parameters, i tried something but it does not work. Dim command As System.Data.OleDb.OleDbCommand = New System.Data.OleDb.OleDbCommand("Update(Agent)" & _ " SET Nummer_Naam = @NummerNaam, Agentnummer = @AgentNummer, Agentnaam = @AgentNaam " & _ " WHERE(Agentnummer = @agentNummerOud)") command.Parameters.Add("@NummerNaam", OleDb.OleDbType.VarChar, 20, "NummerNaam") command.Parameters.Add("@AgentNummer", OleDb.OleDbType.Integer, 10, "AgentNummer") command.Parameters.Add("@AgentNaam", OleDb.OleDbType.VarChar, 20, "AgentNaam") Dim parameter As System.Data.OleDb.OleDbParameter = command.Parameters.Add( _ "@agentNummerOud", OleDb.OleDbType.Integer, 10, "AgentNummer") parameter.SourceVersion = DataRowVersion.Original daAgent.UpdateCommand = command daAgent.Update(dsAgent)
-
Syntaxiserror in updatecommandWhy is it that when i use the updatecommand als below, i get the error: Syntaxiserror (operator missing) in query-expression daAgent.UpdateCommand.CommandText = ("Update Agent" & _ " SET Nummer_Naam = " & agentNummerNaam & _ ", Agentnummer = " & txtAgentNummer.Text & _ ", Agentnaam = " & txtAgentNaam.Text & _ " WHERE(Agentnummer = " & agentNummerOud & ")") daAgent.UpdateCommand.Connection.Open() daAgent.UpdateCommand.ExecuteReader() daAgent.UpdateCommand.Connection.Close()
-
Updating Table of Access DatabaseOk, i see. There is a lot to learn for me. Thanks for the reply.
-
Updating Table of Access DatabaseWhat kind of command do you suppose?
-
Updating Table of Access DatabaseHello all, I know it seems stupid, but i just cannot update a table of my access database. I get an error: In order to evaluate an indexed property, the property must be qualified and the arguments must be explicitly supplied by the user. The parameter (and then the value of my Agentnummer textbox) has no default value This is the code: daAgent.UpdateCommand.CommandText = ("UPDATE Agent " & _ "SET Agentnummer = " & txtAgentnummer.Text & ", " & "Agentnaam = " & txtAgentnaam.Text & _ " WHERE Agentnummer = " & agentNummerOud) daAgent.UpdateCommand.Connection.Open() daAgent.UpdateCommand.ExecuteNonQuery() daAgent.UpdateCommand.Connection.Close() Maybee this is not the right code at all for updating a table. Is there anyone who can help? Thanks!!!
-
How to show more than one database collumns in a listboxThanks. I will try that.
-
Which Exception appears when insert duplicated data (primairy key in a databaseI know a little how try catch is working but can you help me a little ?