The best way I know would be with SQL coding, and your vb coding would just execute the SQL.
Let us know if you need more detail....
User Profile
Collapse
-
-
True enough. I flush everything, just in case, since I am new to VB, and I am paranoid. <g>...Leave a comment:
-
Failing to close the stream before using the buffer will have variable results, but it is definitely the source of the problem....Leave a comment:
-
Amendment:
Imports System.Drawing. Graphics
then you can use:
DrawEllipse
Pass it a pen and a bounding rectangle. If the bounding rectangle is a square, then your ellipse is a circle.Leave a comment:
-
You need to flush and close then IN stream before you write to the OUT stream, otherwise you might not get everything you need into your buffer.
I modified your code accordingly, and it worked fine for me, when I made that change.
HTH...Leave a comment:
-
In light of the stated goal, I interpret your use of "select" simply to mean that you want access to each item in the listbox and the ability get each one in to a variable, rather than user selection of one or more items.
...Code:Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim Price As Double Dim Total As Double = 0Leave a comment:
-
If I understand your situation...
Imports System.Drawing
etc.
If that is not sufficient, you might need to do Add Reference.
HTHLeave a comment:
-
...Code:Private Sub cmdAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdAdd.Click Dim Fn As String OpenFileDialog1.DefaultExt = MyExpectedExtension OpenFileDialog1.InitialDirectory = "C:\MyMusic" If OpenFileDialog1.ShowDialog() = DialogResult.OK Then Fn = OpenFileDialog1.FileName Else Exit SubLeave a comment:
-
VC++ does name-mangling, uh I mean decorating, for exported routines. Perhaps you need the "decorated" name rather than just plain "add" for your entry point.Leave a comment:
-
Perhaps you need short-circuit evaluation.
The Or operator still evaluates both sides of the expression even if the first side is true, so the whole expression is true. With short-circuit evaluation, if the first side of the expression is enough to determine the overall value, the rest of the expression is not evaluated, thus protecting against evaluating something that may no longer be valid.
You might try using OrElse instead...Leave a comment:
-
Good point!
All the situations I had to do something like this involved using up the values and stopping when they were all consumed. I should have thought a little beyond that....Leave a comment:
-
What version of VB? I'm only familiar with vb.net.
One thing you might try, if it is available in your version, is change the string to an array of characters, then you can access each character at will.Leave a comment:
-
Someone suggested breaking the query into smaller pieces so you could update the UI between the pieces.
That may be a good idea for an additional reason.
If the query is complex or has a lot of joins, sometimes breaking the query up into smaller pieces, carefully chosen, can actually Speed Up the process. I have experienced this many times. Might be worth looking at.
What database system?
...Leave a comment:
-
Sorry, I had to guess at the version. datetime is legit in vb.net (VS 2005 I think) that I use at work....Leave a comment:
-
HTHCode:Const MyFormat = "my chosen date format" ' replace with real format Dim MyDate as datetime = Date() Dim S as string = MyDate.ToString(MyFormat) 'Display S in the appropriate place
Leave a comment:
-
[CODE=vb]Public Sub DoSomethingStra nge(A as String)
'Put whatever logic you need in here
End Sub
Dim Answer as string = Textbox1.Text
If Answer="Do Something, Please!" then
DoSomethingStra nge(Answer)
End If[/CODE]
HTHLeave a comment:
-
Yes, it's possible, but not as simple and straightforward as just generating random numbers.
One approach would be to create an array of byte (or integer, etc., but your numbers are small enough for byte) and fill it with your numbers in proportion to your desired frequency of occurrence. a(0) to a(9) might have 40. a(10) and a(11) 41, a(12) to a(16) 42, etc. or whatever whacky or sensible arrangement you want. Now, use your random...Leave a comment:
-
SQLServer has Identity fields that are basically auto-increment numerics. I don't know if Access has something like that, but if it does, then create a temporary table with an auto-increment column and select your report records into the table, then make your report based on the new table, that now includes a "serial number"
HTH
JonLeave a comment:
-
Perhaps code like this will help...
Label1.Text = SomeDataReturne d()
Label1.Update ' This will help make sure the new data displays
JonLeave a comment:
-
Let's see if I understand your question:
User types 12345 in textbox1. You want to put A2345 into textbox2.
If I understood correctly, try this code (vb.net):
Dim S as string = TextBox1.Text
TextBox2.Text = "A" + S.Substring(1)
HTH
Jon JacobsLeave a comment:
No activity results to display
Show More
Leave a comment: