|
Here is an update query that you can use:
Dim queryString As String = "UPDATE [R_Application] SET [Fname]=@Fname, [Mname]=@Mname, [Lname]=@Lname WHERE (" & _
"[R_Application].[AppId] = @AppId)"
As you see, this is the same as you posted in your other thread. There is nothing wrong with it.
As I said in the other thread, you have to look for the error elsewhere in the code.
Debug the code and look carefully where you get the values from that you put in the parameters for the database call. I suspect that what you actually put in the parameters is the exact values that you find in the database.
---
single minded; short sighted; long gone;
|
|
|
|
|
I have a calculation (as can be seen below) and I want to make this number rounded to the nearest number (eg if the calc = 35.5 = 36 or 35, whichever!), how can i do this, i think the code is right, just not the right value in the round field!
'Initial Calculation
intPerc = ((intScoreTop + intScoreMid + intScoreBot + intScoreAll) * 2)
'Round int to nearest number
intPerc = Math.Round(0)
|
|
|
|
|
You can cast to int, or you can use Math.Ceil or Math.Floor to control the direction.
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 )
|
|
|
|
|
Try This, it may not be 100% correct but it should get you started:
dim original as string = ((intScoreTop + intScoreMid + intScoreBot + intScoreAll) * 2)<br />
dim determiner as string<br />
dim result as integer<br />
determiner = original.remove(0,indexof(".") + 1)<br />
determiner = determiner.remove(1,s2.length-1)<br />
<br />
if cint(s2) >= 5 then<br />
result = math.ceil(cint(s))<br />
elseif cint(s2) <5 then<br />
result = math.floor(cint(s))<br />
end if
Posted by The ANZAC
|
|
|
|
|
Wow - that's really messy.
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 )
|
|
|
|
|
It is very interesting but what I noticed was the variables as (intscoretop, intscoremid,intscorebot and intscoreall) if you have defined these variables as INT32, it will automatically round any assigned value therefore if IntscoreTop = 35.6 will come up with 36 and no need to use math.Round function.
Math.Round function is used for double precision floating point numbers.
What a curious mind needs to discover knowledge is noting else than a pin-hole.
|
|
|
|
|
If the above poster assumption is correct then this it a mute point. However in your original code you were rounding zero, which should round to zero
intPerc = Math.Round(0) Math.Round takes a number and rounds it. You need to supply it with a number, in your case you did '0'. What you meant to do is:
intPerc = Math.Round(intPerc)
|
|
|
|
|
TwoFaced wrote: mute point
You mean a moot point.
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 )
|
|
|
|
|
Indeed I did
|
|
|
|
|
How can I use the barcode in my Program?
I had some question about barcode!
In my program how can I print barcode with Standard code39
If you know a free font or component and you test it please introduce me
And how can get the data from barcode reader (such as keyboard, USB, Serial-port) and display in the text box (Please give me a source not component)
|
|
|
|
|
It will depend, but most barcode readers offer an API that returns the code as a string.
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 )
|
|
|
|
|
yes, the most barcode writters receive an string and then generate the barcode, then only must send this control to printer, you can draw this control in a printer o another method should it work.
Greetings from Mexico
-----------------------
Cuando salga el sol, no estare aqui...
|
|
|
|
|
Hi,
I have written a word add-in and its working fine.
I needed to know how to get the filename / path of active (opened) document
Thank you!
M. Nauman
|
|
|
|
|
I have written a word add-in and it is working fine.I want to capture the path of the selected document into my application.Please help me.
Thank You.
Salma.
|
|
|
|
|
i want to create runtime controls and want to give functions to those control
how to do that
with regards
Balagurunathan.B
|
|
|
|
|
I suggest you to focuse on how to create and use classes in vb.net.
What a curious mind needs to discover knowledge is noting else than a pin-hole.
|
|
|
|
|
hey my requrement is to create dynamic tabs
i tried to create but only the last button created works not all the buttons in display r working
with regards
Balagurunathan.B
|
|
|
|
|
Why don't you use tab control? Check the toolbox!
How did you create the tabs?
What a curious mind needs to discover knowledge is noting else than a pin-hole.
|
|
|
|
|
even though we create dynamic tabs or buttons how to evoke events like onclick ,....
with regards
Balagurunathan.B
|
|
|
|
|
|
Hai i have migrated the vb code into vb.net.When i was migrating i found that copy memory function cant able to work it seems.
i am using the function
Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (ByRef hpDest As any, ByVal hpSource As any, ByVal nBytes As Integer)
and call the function inside form1.show
Call CopyMemory(arrBarCodeInformation(0), ptrBarCodeInfo, size_Renamed)
i have declared
Public arrBarCodeInformation() As BarCodeInformation
Public Structure BarCodeInformation
Dim tRegionRect As rect
Dim dwBarType As Integer
Dim fOrientation As Single
Dim lDecodeStatus As Integer
Dim lNoOfCharacters As Integer
Dim lpbDecodByteArray As Integer
Dim lReserved As Integer
Dim hReserved As Integer
End Structure
using this i want to copy the memory value from integer value into the structure variable.how can it been done.tell me the syntax are any function to copy memory
|
|
|
|
|
You're not listening. You do NOT need CopyMemory to do this. You need to marshal this structure to your function properly. This is not done the same way it was under VB6.
If you created and instance of this structure in your code and just want to assign a value to one of it's members, then all you have to do is something like this:
arrBarCodeInformation(0).dwBarType = 42
Other than that, you haven't described what your doing with this stuff, nor have you posted any of the code you're trying to convert to show us what you want it to do.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi All,
How do I state where abouts on the page I want a msgbox to appear?
Also is it possible to make it topmost (like the way you can make forms top most).
Thanks in advance
Jaidev
|
|
|
|
|
Popular question This was asked just a few posts down. I believe you can't position the msgbox. You could make your own message box though. All it is is a form. It's little more work to re-invent the wheel but if you want to place it then you'll need to create your own. It will also allow you to make it topmost.
|
|
|
|
|
Hy
I need to read a text file from a server.. i can connect with a ftp 2 that server - how do i do this??. Can anyone help?? - i'm using vb 6
|
|
|
|