|
This doesn't work if you don't have a database.
There's no need to retrieve anything if you use the .NET methods. The CLR will do it for you out of the resources you include with your app. Why write a bunch of code when you don't have to write ANY?
|
|
|
|
|
Hi,
how to use Visual Source Safe in VB.Net?
thanks
Viji
|
|
|
|
|
What do you mean ? Do you want to control it, or just use it ? Do you even understand what it does ? I mean, it's hard to tell from your half question.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi,
I am going to develop a third party dll(windows control collection). And i would like to allow consumer of that dll for a specific duration only.
how can u do it..?
thanks in advance..
regards,
LVPrasad Y
|
|
|
|
|
Basically, you would need to store the date your dll was installed, so that deleting it and reinstalling it will not reset it. Then, check it when you try to run. And, expect that anyone who wants to, will decompile your library and remove your security checks.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi, I have a usercontrol with a 3d appearance, created in vb6. Is there a way to get this to theme to the xp theme styles. I already have a manifest file setup for my exe and that didn't work for my usercontrol.
|
|
|
|
|
This might be what you need.
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
I have already tried these. My control still appears 3d.
|
|
|
|
|
|
I'm working with the Framework 2.0 Windows.Forms.Webbrowser making a tabbed browser. I'd like to mirror IE7's behavior of openning a link in a new tab on a middle mouse button click. While I'm able to this, I can't figure out how to prevent the directional-drag autoscrolling that seems to be the default behavior for the middle mouse click.
How can I disable or otherwise intercept the autoscroll feature? Thanks!
|
|
|
|
|
Can you please show us the code so we know what to work with? Like how your opening links in a new window for instance.
Posted by The ANZAC
|
|
|
|
|
It's not code I have that I'm having the problem with. The problem I'm having is with the latent behavior of the WebBrowser control. As in, if you happen to be using IE, move to some white space on the web page and hit the middle mouse button. If you're like me, you should get a little circle arrows pointing up and down; dragging your cursor away from the circle cause your page to scroll that direction.
In the WebBrowser control, this behavior occurs even when clicking on links. This is what I want to avoid. I'm hoping for some way to intercept and cancel, or disable this behavior on a the event of a middle mouse click that's found to be over a link element.
|
|
|
|
|
I understand the issue you're having but it would be good to see the code u are using to see if there is some way to program in an intercept for that particular IE Behaviour.
Posted by The ANZAC
|
|
|
|
|
Is 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)
|
|
|
|
|
keninfo wrote: i tried something but it does not work.
What do you mean it doesn't work? Do you want us to guess?
My guess would be that you have not supplied the values for the parameters properly (hint: the last argument in Parameters.Add ). These are literal values. They will be the same every time the application is run. You might want to change these to the values you want the parameters to have.
|
|
|
|
|
But 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.
|
|
|
|
|
keninfo wrote: But 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")
Did you not read the documentation?
@AgentNaam is your parameter name (think of is as a variable name). When you use @AgentNaam in your SQL you get the value of the parameter. Just like you would a variable in VB.NET
The last argument is the value you want the parameter to have. Putting in "AgentNaam" will mean the parameter will always have that value. It is like writing the following in VB.NET:
Dim agentNaam As String = "AgentNaam"
keninfo wrote: 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
Where you currently have the literal string values (That's the last argument of the Add method) you should change that to the appropriate values that have come from the text boxes.
|
|
|
|
|
Thanks 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)
|
|
|
|
|
Why are you using a data adapter?
command.ExecuteNonQuery() is all you need (and an open connection)
|
|
|
|
|
I need to import tab delimited text files into Sybase tables using VB.Net.
What is the fast and efficient way to do this.
The text files I import have 3000 rows.
Thanks.
VB Prog
|
|
|
|
|
Can anyone please help.
Thanks.
VB Prog
|
|
|
|
|
Hello everyone,
I have a function that recieves a filepath to a XML file and a XML Schema. I need to load my XML file into a Dataset if it matches the schema.
I then need to write the XML into a database. Can somebody please give me an example of how to do this. A simple XML file with a simple schema and an equally simple data base with a few tables would be great. As soon as is possible. I just need to see an example and I can go from there.
Many thanks
-ukfrosty
|
|
|
|
|
This really isn't a good article, but it might help you out.
RSS News Reader
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
I 'm making a project, and i need to make it well, so i want to manage exceptions well
I mean to make a message for each error, and i want to write message in French not in English, so what I should do?
I need to check data types (int - string ...) because the user can add a float in a case of integer and a string where he should enter a number...
I need to check the date format because the user can use the US or the UK system dd-mm-yyyy or mm-dd-yyyy or else.
I need to manage the errors by the application like the division by zero and else.
Thanks for help.
|
|
|
|
|
hi lord,
write ur code between following block
Try
'Write your code here
Catch ex as exception
msgbox ex.message
End try
from above code u can able to handle any type of exception.
Now call following function at keypress event of Textbox so the user must be enter proper value
// For accept only Text & white Space pass "e" ( one of the argument of keypress event) to this function
Public Sub CheckPressedKeyText(ByVal key As System.Windows.Forms.KeyPressEventArgs)
If Not (Char.IsControl(key.KeyChar) Or Char.IsLetter(key.KeyChar) Or Char.IsWhiteSpace(key.KeyChar)) Then
key.Handled = True
End If
End Sub
// For accept only numeric value with "." pass "e" ( one of the argument of keypress event) and "sender.text" to this function
Public Sub CheckPressedKeyNumericWithDot(ByVal key As System.Windows.Forms.KeyPressEventArgs, ByVal str As String)
If str.Contains(".") Then
CheckPressedKeyNumericWithoutDot(key)
Else
If Not (Char.IsControl(key.KeyChar) Or Char.IsNumber(key.KeyChar) Or key.KeyChar = ".") Then
key.Handled = True
End If
End If
End Sub
// For accept only numeric value without "." pass "e" ( one of the argument of keypress event) to this function
Public Sub CheckPressedKeyNumericWithoutDot(ByVal key As System.Windows.Forms.KeyPressEventArgs)
If Not (Char.IsControl(key.KeyChar) Or Char.IsNumber(key.KeyChar)) Then
key.Handled = True
End If
End Sub
for date, use DateTimePicker & set format property to "Custom" and then set Custom format property to ur choice.
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
|
|
|
|