VB 2008 - Complementary Error Function?
Nov 24, 2009VB 2008 - Complementary Error Function?
View 2 RepliesVB 2008 - Complementary Error Function?
View 2 RepliesI have no idea what its doing to me I didn't put any debug points in but it stops and goes to a highlighted line on my rename function.
View 9 Repliesi'm accessing an access database and want to execute the following query
INSERT INTO sometable
(date, field1, field2)
SELECT ( ? AS Expr1, field1, field2)
FROM othertable
? is a date i generate in code and field1,field2 belong to othertable i put it in a tableadapter and execute it by me.tableadapter.queryname(calculated date) but i get the error : Too many arguments to 'Public Overridable Overloads Function queryname() As Integer' Also if i try to generate the date in the query builder in the form dateserial(year(now),month(now),1-1)the query builder does not accept it?
What I am trying to achieve is if there is an error in cell 1 of the current row it returns to that cell. The code below tries to achieve that, but I get an error message thus:Operation is not valid because it results in a reentrant call to the SetCurrentCellAddressCore function.
Private Sub RoomPricingDGV_CellEnter(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles RoomPricingDGV.CellEnter
If e.ColumnIndex = 2 And cellerror = True Then
[code]....
im trying to get mac adddress from this code but i get eerror on END FUNCTION line it says this "function 'getRemoteMac' doesn't return a value on all code paths. A null reference exception could occur at run time when the result is used." what am i missing here?
[Code]...
Hi. what is the difference of sleep function and pause function (using timer) between a loop.
View 12 RepliesWhat will happen when 3 function calls same function at a time? I have 3 Function, f1,f2,f3.. Those function after completing their task will call finish() function. What will happen if Finish is Called morethan once..
View 9 RepliesI have a function
Private Function cmbBxReset()
cmbBox1.SelectedIndex = -1
cmbBox2.SelectedIndex = -1
[code]....
problem is End Function is show in green colour.
I'm trying to retrieve the directories and files on a remote computer.[code]...
View 3 RepliesI have the following code as part of my control. SetReaderMode function creates the structure and calls the function explained heren I run this code, i get the error Attempted to read or write protected memory. This is often an indication that other memory is corrupt.I'm not sure what the issue may be. What am I doing wrong?
<DllImport("Comctl32.dll", EntryPoint:="#383", _
CallingConvention:=CallingConvention.StdCall)> _
Private Shared Sub DoReaderMode(prmi As READERMODEINFO)
[code].....
each time I execute the following function,I get this error:"Arithmetic operation resulted in an overflow." [code]
View 2 RepliesI have a function that returns a double. If in the function I decide the value is invalid, is there any way to return "error" instead of a double? Of course I could pass a boolean by reference and set it false and then check for that back in the calling function, but that seems awkward.
View 5 RepliesI have a multiple-value-single-string as a parameter field in a report in Report Builder 3.0 (e.g. 20124, 20125). Now I want to split up this string, and show "Summer 2012" instead of "20124" and "Fall 2012" instead of "20125. I am using Visual Basic. Here is my two functions I have made in Report Builder 3.0 custom code. The error is in the second function in the "If Right(yearterm)..." line. It gives me a syntax error. If I write "String.Right" it gives me the error: "'Right' is not a member of 'String'". If i take out the whole "If statement" the report will run but "20124,20125" gives me this: ", 2012, 2012".
Public Function SplitParameterValues(ByVal parameter As Parameter) As String
Dim result As String
Dim a(0 To 10) As String
[code]....
I want to be able to pull data from 6 text boxes with identical names (other than a number at the end) in a for loop here is the error:
[Code]...
I am just trying to call a little error check function, and if the return value, isOK, is false, let the user change stuff and then call the function again. If isOK is true, the rest of the program runs. For some reason, when i run the test under conditions I know to be valid, or true, the function still returns isOK = false.
CODE:
I'm using this code in my ASP.NET/VB.NET project:
Dim sourceFile as String = "http://xml.weather.yahoo.com/forecastrss?p=94704"
Dim xPath As New XPath.XPathDocument(sourceFile)
and the second line gives the error: "Unable to connect to the remote server"
When I browse the url (sourceFile) in web browser, it opens the RSS feeds page finely. How can I remove this error?
When Score exam is clicked, the answers from the keys file is read using ReadLine method 6 times to fill the Answer Array. then the users' answers and the answers from the keys will be paired up by calling "Compare_Answers" function in the RMV Global Module. and calculate the score and it will show on the main form.
View 9 RepliesI am using this function in a module which is called from this event " Public Sub Painting(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs)" in the module[code]...
View 1 RepliesI'm making a class and I have a function in this class the is looking to see if a user account in enabled.
Public Function IsEnable(byval user as string) as boolean
'if user is enables
return true
else
return fulse
end function
What is it just does not find the user, how would I return an error that the person using the DLL could detect and catch?
What is the wrong in the below code?
ClientScript.RegisterStartupScript(
Me.GetType(),
"key",
"return confirm('Are you sure you wish to delete these records?');",
True)
Is there a way to call a function everytime it throws an error? I could use try catch, but I need to do it with unexpected errors.
View 8 Repliesif i got a function with a try cath block inside and the function should return an integer.how would i do it that the function can return me a the error message?public function test() as Integer
[Code]...
Having problem understanding Delegate error. Error says expression expected, How do I fix?Here is the offending line (#259)....
mylist.ForEach(Delegate Function(P As linkItem) As System.Char[] )
Here is the entire code.
<script language="VB" runat="server">
Function sectionTitle(ByRef f As String)
'Open a file for reading
[code]....
I'm a beginner when it comes to Visual Basic coding and I need some help with an error I'm getting. I'm trying to pass a structure array to a function to figure out a student's grade. I'm getting the error that 'QuizOne' is not a member of System.Array. Here is my code:
[Code]...
i made application for computing totient function but it doesn't give me any result this is a code Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
[Code]...
i made application for computing totient functionbut it doesn't give me any result
this is a code
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
[code]......
I understand that this is bad programming practice and redundant coding but I am curios.
I am simply counting a number up to 9999999 in a while loop. The Add() function simply increases that number and prints it out.
Inside the Add() Function I call the Add() function.
My program successfully prints out 12000ish numbers before I get a StackOverflow Exception.
So my question = Is there any way to ignore this error and keep counting?
I have tried On Error Resume, Try/Catch, and throw
My code is as follows.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
While number1 < 9999999
[Code].....
In our code base there is a function which should return either an object or nothing. The exact code is this : Return NothingThe calling method looks something like thismyObj = theClass.function()if myObj <> nothing then // fails
View 1 RepliesI'm having a hard time displaying random numbers from a button the labels on the same form. This is my first time dealing with VB in general, and I'm having trouble locating this for a project.
I have another assignment as well for my class (which uses an earlier version of VB than me), and I'm pretty much doing everything on my own in a different format for the newer version. how to use an array for images as well?
Have seen some solutions for C# but do not know how to solve the issue in VB.NET.
Query:
Dim Query = (From t In myEntities.Bookings
Where(t.Ref = Someid)
Select t.People).Sum()
t.Ref field is an Int and so is t.People.
The SomeId value is the primary key of the related table. This issue is that there will not always be records in the Bookings table with a Ref value of Someid - so the query throws the following error.
I have seen others have got around this problem with catching the error, but from reading up on this and as per the error information it seems there should be a solution (in VB.NET) to cast the query or some of the fields in the query to nullable types?
Error is as follows:
The cast to value type 'Int32' failed because the materialized value is null. Either the result type's generic parameter or the query must use a nullable type.