Search:
Type: Posts; User: Pyth007
Search:
Search took 0.02 seconds.
-
Thanks for your question.... I figured out my problem. I had just put it right under the Class signature instead of creating a Method for it. Told ya I was out of VB for awhile!
-
It's been awhile since I was using VB.Net, but I'm having a problem with the most basic of Basic programming... I can't declare variables! Even using extremely simple code:
Dim MyInt As Integer =...
-
"Developer" as in the person developing this backup process or the off-site server's developer? We don't have any control about the amount of space we get allocated from this off-site server so even...
-
I'm unsure what you mean. You pass in the existing array when you call the function. And since that parameter is ByRef, the parameter will not be a copy of the existing array, but will point to that...
-
With Dday9's example, setting the arr() parameter ByRef means that whatever is done inside the function will occur to the original array that the caller passes in to that function. Although that...
-
We are trying to start a very basic source code backup system for our in-house code. As almost all of our programs are just written by 1 developer, we're not too concerned about version control and...
-
Although D is called the "decimal" format, its name is somewhat misleading in that the "decimal" just refers to the digits 0-9 and not to a Decimal datatype. In fact the D specifier won't even work...
-
Although for VB.Net I'd say this is important, this is more specific for this language, not a general programming tip. To make this more useful for other languages too, you should try to program as...
-
If you don't like a large series of If's and / or you want your code a little more flexible to add in new accessories, you may want to loop through all of the CheckBoxes and add their value to a...
-
First thing that you should always do... Set Option Strict to On. Were you to have done this, you'd have seen the error... It is on the line:
if CheckWithdrawal(Balance, BalanceInterim,...
-
As for the question asked in the topic's title... I assume since you are using ? in the query as the place-holder for the parameter, that you are working with an Access database. If so, then multiple...
-
When you receive an error message, it is helpful if you'd tell us on which line the error occurs as it sometimes gets to be too difficult to search through all of the code to find the one error. This...
-
Actually, it is precisely because Shorts are 16-bit DataTypes that cause their performance to be less than an Integer... When the program does any calculation with a DataType that is less than...
-
One last thing that I noticed... You are using the Short DataType, which while is ok to use, it is not the best choice performance-wise. Integers perform the fastest of any numeric type in VB but at...
-
You could also try Server=localhost as it appears that you are just trying to connect to a local database that resides on your computer. Also I assume you are using the MySQL Connector/Net driver...
-
Just one slight correction to JMC's code (actually not a true correct; see my Edit note below)... In the If-statement of the verification, it should use the short-circuiting OrElse:
If Not...
-
As for why your controls seem to not do anything while the code is running is because controls are the last thing that a program will handle. It will post messages about the actions to complete to...
-
First, there is a line that doesn't make sense:
A = (TxtNmbrBox.Text = "")
A was declared as an Integer, but that line doesn't return an Integer; if it does return anything, it'd return a...
-
Try changing your connection string to:
con.ConnectionString = "Provider = Microsoft.ACE.OLEDB.12.0; Data source = C:\Users\William\Desktop\WillC.accdb;"
-
I suspect that because the table in Access is linked to a table in MySQL, that Access just has the database structure without any actual data... Why are you trying to connect to the database through...
-
Several other weird things about this code... Firstly, the names used for your columns / fields don't match... I think It'd be better to use something like:
SELECT '-- Please Select --' AS...
-
Although I agree with dday9 about using the NUD control, I'm not sure whether those are allowed for this assignment, in which case you'll need to know why your code is throwing that exception. For...
-
Although that will get rid of the error, you still are not using that variable. Notice that FunkyDexter's solution uses that variable inside each validation block by setting the variable to True if...
-
When you say "open the file" do you mean to open the file in Notepad? Or is there a control on the form that you want to use to display the lyrics? You are opening the file, however you are not...
-
The reason for this error is that the .currentMedia Property of the WMP is not a String yet you are attempting to compare it to a String, so the program is trying to implicitly convert this object to...
-
I'm not exactly sure what is wrong other than "the value is not display properly" (ie what did you input, what did you expect to be the output, and what is the actual output), but I'm tempted to...
-
Are these all under the Form's class? For example, does it look similar to:
Public Class Form1
Private Sub tbInput_KeyDown(sender As Object, e As KeyEventArgs) Handles tbInput.KeyDown
...
-
I don't think what you suggest is possible... I tried by making a simple program with a WebBrowser control with its url set to a PDF file. I then tried looking at the DocumentText of the WebBrowser...
-
I'm glad you got it working... Yeah, the parameters are just how the query gets set up and sent to the database; all of those jobs you listed are done after the database has returned the table of...
-
Wlecome! Just an FYI since this was your first post... Try to use [CODE] tags around your code (the button with the # sign). This will wrap your code into a code-box like in TG's first response which...
-
You say you want the button to disappear if the TextBox is empty, but your code does the exact opposite. The Function IsNullOrEmpty returns true if the String parameter is null or empty. So "If...
-
Kevin's code is essentially what I'd suggest too... You might want to make it into a Function, however, that returns the array for processing instead of doing all of the processing of the array...
-
Take a look at the TextFieldParser Class. This is a quick way of reading in delimited text files into an array for each line. You can then check the String in the first element of the array to...
-
For #1, since the entire query is hard-coded (ie you don't have any user input to alter the query), you don't need to use parameters. For #2, however, you should be using parameters for the very...
-
When I first read that, I was taken off guard, thinking that the prof. must really be crumby to make the computer class come up with their own formulas. So I went back and read the assignment:
...
-
I did not realize that, my bad... (and here I thought I had found the issue with a nearly invisible typo) :blush: It probably is the single-quotes that Shaggy was referring to...
-
strSQL = strSQL & " Values"
strSQL = strSQL & "(" & "#" & Date & "#, "
From this part, the string will be:
Values(#2/22/2015#, (assuming 2/22/2015 is the Date)
Notice that there is no space...
-
If you are just grabbing the data out of Excel and don't care about the formatting of the spreadsheet, then ADO.Net is much faster than using Interop. I'd suggest that you use that to get the data...
-
You can use DataBindings in order to connect a Control to a particular data provider. So for example, you can bind a TextBox to a ComboBox like:
Me.TextBox1.DataBindings.Add("Text",...
-
Actually, it looks like budhay99 is trying to use Parameters, but is going about it the wrong way. Notice below the query are a bunch of .Parameters.AddWithValue lines... However the query itself is...
|
Click Here to Expand Forum to Full Width
|