Unclear Syntax In Procedure?
Dec 7, 2010
Currently going through Murachs beginning VB.NET adn come across some code that I am do not understand. I have attached a document of the application. If the user clicks on the future Value radio button the ReadOnly property of the Future Value text box is set to true and a CaluclateFutureValue procedure is called. If the user clicks on the Monthly Investment radio button it sets the ReadOnly property of the Monthly Investment text box to true so a user can enter a value. A CaluclateMonthlyInvestment procedure is called. The code of the procedures is as follows:
Private Sub CalculateFutureValue()
lblFutureValue.Text = _
FormatCurrency(FV(txtInterestRate.Text / 12 / 100, _
[code]......
View 3 Replies
ADVERTISEMENT
Apr 23, 2009
I have a dataset with a bunch of tables in it. I also have a database with the same tables, but not necessarily the same number of rows. Any table in the dataset will have the same rows as there are in the equivalent table in the database, but there may be a few extra in the dataset. What I'm looking for is a fast way to determine whether there are extra rows, and if so, they need to be inserted into the DB.
View 2 Replies
May 31, 2011
Function f(ByVal x As String, ByVal y As Integer, ByVal z As Integer, ByVal w As Integer, ByRef t As String) As String
If Length(x) < w Then // Definition for Length below
Return t
End If
[CODE]...
I am not a VB programmer, but I assumed for the most part that the syntax is C like, I received the program above from a non-technical recruiter with the following input f1("enritcde3 dtyeds4t8", 2). From my understanding the following output would be ("enritcde3 dtyeds4t8",2,2,2,""). Am I missing something?
View 2 Replies
Aug 27, 2010
I am new to nodes() method. I am getting the foloowing syntax when trying to create a stored procedure using the nodes() method.
The syntax error:
Msg 170, Level 15, State 1, Procedure spmTestSelect, Line 19
Line 19: Incorrect syntax near '.'.
[code]...
View 2 Replies
Jan 8, 2012
This is my stored procedure
[Code]...
View 1 Replies
Sep 27, 2010
I am making a visual basic game. And in the game I have a few instances where I want to call open a window (let's save to save the user's preferences) from a form, then I want to go from that form to another one.
Example:
The user has completed the new game page. I have the users choices in a host of string, integer, and boolean variables. Now I want to use a generic saving screen I made with a progress bar. When I open up the saving box, I want to close or hide the new game setup menu (whichever I need to do). Then when it is done saving I want the Saving bar to return and cause the new game form to open the actual game form and close itself.
So I guess my question is this: What is a reliable(or correct) way to poll for a return in form to signal it to go ahead with execution?
Second:
This is similar to the first question. Instead of keeping the first form open when I use the saving form; is there a way I can save the name of a page I want the saving bar to go to once it's done?
I want the user to enter their prefered username before they start a new game for the first time. So I poll the saved username setting I have and if it equals "username" I want the Username entry form I made to pop up, but once it's done I want it to immediately call the new game screen. I also want to use this username entry form on the options screen so that the user can change their accepted name at anytime; but I want this screen to return back to the options screen.
What is the accept way to do this? Is it done through stacks? (form information -> stack : load new page : Do stuff: load stack value -> goto)
Finally:
Do I have to keep a window open (not close it) to access the variables that I have defined in it, and have stored values too? Does this apply to hiding too?
View 1 Replies
Feb 26, 2012
I have a VB2002 program that works. When I run it in VB2008, it updates, and runs and debugs until I shut down. When I try to start it up again from the updated SLN, or try to run the .exe in the BIN folder, I get the message "This application has failed to start because the application configuration is incorrect.
I checked the error logs and it says there is a syntax error in the first line of the vhost.manifest file in the BIN folder. The first line is the xml declaration and it includes the parameter standalone = "yes".
When I put the error message into Google I only get references to Visual C++ compiled programs running on machines without the C++ redistributable dll. That doesn't seem to apply here at all, since I have the VB 2008 express edition installed on this
View 2 Replies
Oct 12, 2011
I am having an issue trying to figure this out. I am writing a script editor that uses tabs (a tab control) and I want to implement syntax highlighting. My issue is that every sample I can find on syntax highlighting uses
Private Sub RichTextBox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RichTextBox1.TextChanged
View 1 Replies
Dec 1, 2011
The instructions are as follows:
1. Write a Visual Basic Console Application.Inside the main procedure call a function procedure to input and return a value for a double variable called x, the width of a right triangle.Inside the main procedure call the same function procedure a second time to get a value for a double variable called y, the height of a right triangle.
2. From the main procedure call a function procedure which calculates and returns a value for the hypotenuse equal to the square root of (x squared + y squared).You will have to pass the values of x and y to this function procedure.The procedure should calculate and return a double type value.The value that is returned by this function procedure should be equal to the square root of (x squared + y squared).
3. Also from the main procedure call a sub procedure to display the values of x, y, and the hypotenuse.
View 4 Replies
Feb 23, 2010
In a tic tac toe game I am making there are two blocks of code that are identical except that they access different arrays:[code]Arrays plyrTaken and plyrPairs are used in the first block and cmptrTaken and cmptrPairs are used in the second. Is it possible to wrap these blocks into one Sub Procedure passing the different arrays when the procedure is called?
View 5 Replies
Aug 10, 2007
Well i ran into some problems changing my getfwt to a independant sub procedure. This stuff is so confusing to me.[code]...
View 14 Replies
Mar 11, 2010
i able to get data then i click second time i got error Procedure or function "procedure name" display has too many arguments specified" why this error. [code]
View 2 Replies
Nov 29, 2011
Is there a way to terminate calling procedure from the callep up procedure? I tried 'Stop' from a called up procedure in an executable; it has gone stuck; I am not able to remove it(the form) from the screen!
View 18 Replies
Apr 15, 2010
I finished coding an application for converting Celsius to Fahrenheit, and vice versa. I used the Sub Procedure to convert them. What I need now is to modify it. I would have to use the Function Procedure instead of my Sub Procedure.
[Code]...
View 11 Replies
Dec 16, 2009
Can any one translate the following syntax to vb.net.
m_TextBox.Loaded += TextBoxLoaded
m_TextBox.Loaded -= TextBoxLoaded;
private void TextBoxLoaded(object sender, RoutedEventArgs e)[code].....
View 4 Replies
Mar 30, 2012
Im a student doing an assignment, how do i pass the value from a sub procedure to a function procedure....i want to pass the value from decSubtotal to a function procedure named CalculateDiscount; check out my code--
[Code]...
View 1 Replies
Sep 5, 2011
i have this code:Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
[Code]...
Error 1: Option Strict On disallows late binding.Im using visual basic 2010 express on a gateway laptop thats running Windows 7 OS How do i resolve this error?
View 2 Replies
Apr 9, 2009
I have a listbox and it it I am showing numbers.It should look like this (line by line) 1,2,3,4,5,6,7,8,9,10,11.....but is is showing it like this 1,10,11,...2,20,21...3,30...ow can I make it that it will show it in number order 1,2,3,4,5......
View 5 Replies
Oct 21, 2009
I want to select some rows from a sql express 2005 table. I am using this expression: "Starttime >= " & dtpStart.Value dtpStart is a DateTimePicker But I am getting this error: Syntax error: Missing operand after '14' operator.
View 18 Replies
Sep 11, 2009
The store procedure which give me the information I need is:
USE [UCSMIS]
GO
SET ANSI_NULLS ON
[Code].....
When I try to add it to my report it gives an error, is it because of the temp table and how should I go about it?
View 2 Replies
May 4, 2010
I have to get a value in $.I have 2 radio buttons:
-Residential Customers
-Business Customers
I have 2 List boxes:
-Premium Channels
-Connections
I also have a total Text Box and a calculate button..My goal is to get a cost given the information from the user. the list boxes will have preassigned numbers in them..The residential Customers have to pay a $4.50 Processing fee, a Basic service fee of $30 and 5$ for ever Premium Chanel they buy. The Business Customers have to pay a processing fee of $16.50, a basic service fee of $80 for the first 10 connections (4$ for any connection after that) and 50$ per Premium Chanel (no limit)
View 1 Replies
Aug 29, 2011
I have a stored procedure to update a table, but needs a couple of values from another table.
the first two selects get the value from the table and then are used in the update statement.
The select statments:
Select @iStatusDropDownValueID = iDropDownValueID
From DropDownValue
Inner Join DropDownValueType On DropDownValue.iDropDownValueTypeID =
[Code].....
First, the values that are retrieved by the first two select statements are always the same. So they could be passed in by the code itself. I don't know that this will speed things up at all, just make the entire stored procedure better and easier to read.
Second, if the "Value Name" should change this store procedure will break (which is possible, but not often).
I am looking for any insight into the Best Practices for this situation.
View 2 Replies
Aug 7, 2009
I have a web service in c# and its working well in c#.Following is one method i used in it
[WebMethod(EnableSession = true)]
public void abc(BllNew objNew)
{
new DAL.Entity.BllNew().sample();
}
But again i implemented above method in vb and is like this
[WebMethod(EnableSession = true)]
public void abc(BllNew objNew)
{
new DAL.Entity.BllNew().sample();
}
One syntax error is showing near 'new' keyword.What change i hve to get rid of syntax error.
View 2 Replies
Sep 11, 2009
I have the following code snippet:
CODE:
I do not understand the
CODE:
Can someone explain it? For the record...dropOperation is an enum. Can you give vb syntactical equivalent is all I need.
View 10 Replies
May 25, 2011
SELECT dbo.Calls.Description, dbo.TicketRead.IsRead, dbo.TicketRead.UserID
FROM dbo.Calls
LEFT OUTER JOIN dbo.TicketRead ON dbo.Calls.CallID = dbo.TicketRead.TicketID
WHERE dbo.TicketRead.UserID = 1 or is null
I want to get a list of all calls, but also a value indicating if the user have read the call. so I made when a user open's the ticket a new record is added in a special table. now if no user have read it then it's ok, but if just one user have read this ticket, then the other users don't have this call in the list..
View 2 Replies
Apr 29, 2012
just starting out to learn vb.net. I am doing so cuz i have some vba stuff i need to port.orry for the beginner question: translate this code I use in Outlook to vb.net? I know it's not complete, but I am stuck here.
Private Sub Application_ItemSend(ByVal Item As Object, ByVal Cancel As Boolean)
Dim objNS As NameSpace
im objFolder As MAPIFolder
[code]....
View 1 Replies
Feb 6, 2012
The following is from a WCF sample I am working on.
<ServiceBehavior(InstanceContextMode:=InstanceContextMode.Single)> _
<Foobar()> _
Public Class Service1
I've never understood this and just used examples, but I would like to understand what is going on here. What exactly is the stuff inside the <> brackets? How are these related to Service1? I understand the ServiceBehavior is related to the hosting, but what about Foobar?
View 2 Replies
Jun 7, 2012
I'm trying to display an aggregate feed of several RSS feeds. I'm doing this with an asp page.The problem is I'm getting the error message:Microsoft VBScript compilation error '800a0401' Expected end of statement for the line:Dim feed As SyndicationFe
View 1 Replies
Apr 7, 2011
I used to have this one
Dt = MyMod.GetDataTable("SELECT TOP " & QuestionsPerCats(i) & " * From Questions WHERE CategoriesID ='" & Cats(i) & "' ORDER BY NEWID()")
but now i decided to use sqlparameters like
Dim cmd As New SqlCommand("SELECT TOP @QuestionsPerCats * From Questions WHERE CategoriesID = @CategoriesID ORDER BY NEWID()", conn)
Dim sqlParam As SqlParameter = Nothing
sqlParam = cmd.Parameters.Add("@QuestionsPerCats", SqlDbType.SmallInt)
[code]....
and returns the following error
Incorrect syntax near '@QuestionsPerCats'.
View 3 Replies
Aug 6, 2009
I can't get a handle on the syntax. Can anyone give me a simple demo?
View 3 Replies