|
Try
orderDate = IIf(IsDBNull(DR.GetDateTime(0)),"",DR.GetDateTime(0))
IIF(expression,Truepart,falsePart)
|
|
|
|
|
I tried your code, but the output is like this:
when the GetDateTime(0) has value, then it output empty, run time is fine, but if GetDateTime(0) is Null, then it has error "Specified cast is not valid"
do you know why?
thanks.
Lisa
|
|
|
|
|
I noticed that you are trying to put the datetime into a string variable.
Since your variable is not a date do not use GetDateTime.
orderDate = IIf(IsDBNull(Convert.ToString(DR(0))),"",Convert.ToString(DR(0)))
DR(0) should match the column or use the Column Name DR("COL_NAME")
Or try to use a non Date datatype
orderDate = IIf(IsDBNull(Convert.ToString(DR.GetValue(0))),"",Convert.ToString(DR.GetValue(0)))
play around with this.
|
|
|
|
|
Hi,
Just wondering if anyone knows of an easy way to create a wizard in vb.net ! I will be using it to lead the user through a series of questions and store their responses.
I am using Visual Studio Profesional 2003
Any help would be FAB !!!
Thanks
Martin
|
|
|
|
|
oops forgot to say that the wizard will need to be part of a web app.
|
|
|
|
|
Each page is going to ask a question or two. When the user clicks Submit, it calls back to the server where those values are stored (probably in a database associated with a session ID), then baced on those values, the page will have to chose the next page to redirect to. Where the same thing happens again... Until all your questions are answered.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
HI,
Yep that is exactly what i need . but i am still not sure of the best way to make it
Any help would be FAB !!
Thanks
Martin
|
|
|
|
|
I would like to know the code for adjusting the length of scrollbar if i want to shorten the length of the scrollbar and add a picture below the scrollbar. Currently i'm using AutoScroll function.
|
|
|
|
|
You don't. The scrollbar automatically adjusts itself depending on the length of the client area it controls.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I want to know how you can take global variables as strings in VB and write them into an existing pdf in the correct areas.
|
|
|
|
|
1. Global variables are a good sign that whoever wrote your code has no idea how to program
2. The location of variables has nothing to do with the ability to put them into a PDF
3. Unless you have created the PDF yourself, and it's not compressed, you'll need a third party tool to do this.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
I've created the pdf myself. What I want to do is put the variables into fields in the pdf. How do I do this?
|
|
|
|
|
SAve the PDF without compresion. Any field you want to be able to set, fill it with a unique string, and spaces to fill it to the maximum length you'd want. Then load the file, look for the strings and replace them.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
hi, i need help on vb6
how can i chang the standard form to obtain
and other shape.
for example, i want to locate my command buutons
on circle shape not on standard form.
|
|
|
|
|
You need to make 2 API calls:
CreateRoundRectRgn - API to create a rounded rectangle region.
SetWindowRgn - API called with the form handle to set the form's region to the rounded rectangle created with CreateRoundRectRgn.
Search the MSDN for these two APIs to learn how to use them.
Robert
|
|
|
|
|
Hi,
I want to check whether the email ID entered in the text field is proper or not.
What can I do?
|
|
|
|
|
|
Help!
This begins my third week of teaching myself VB6, and graphics are hurting my brain.
I've been trying to load and do things that should be simple with images, like scaling them or changing their format then displaying the changed image, with image quality in mind. Examples of this are very few, and I don't really understand what I'm looking at in the code, anyway.
I downloaded FreeImage from SourceForge, but even that is proving to be a pain. I just can't get images to display in picture boxes.
Does anyone know of any good VB6 tutorial websites that have clear examples of this sort of thing?
My ambition is to make my own thumbnailer and maybe image editor so that I can learn how graphics work in VB6.
Thanks much!
I am the very model of a modern newbie programmer,
Crashing my computer 'cause my code creates a clamor.
My code and little programs are all never quite original,
I even stole this piece of music from a major general.
|
|
|
|
|
Pretty much everyone has converted their sites to support VB.NET. Microsoft has stated that VB6 is "officially dead" at the end of this month.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
VB.NET is so expensive though! I can't afford it on my allowance.
This VB6 Learning Edition I have was a hand-me-down from a cousin. Maybe I better just shelve this ambition until I get to college in a few years. By then, VB.NET will be officially dead.
I am the very model of a modern newbie programmer,
Crashing my computer 'cause my code creates a clamor.
My code and little programs are all never quite original,
I even stole this piece of music from a major general.
|
|
|
|
|
MoonSong wrote:
Maybe I better just shelve this ambition until I get to college in a few years. By then, VB.NET will be officially dead.
Not likely...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I always found it best to use an Image Box For resizing images as it provides more clarity. If you want a sample project sent to you, email me.
Cheers
"If i was king cigarettes would be free."
|
|
|
|
|
hi,
we r using vb.net for creating a web service. we r refering to the book vb.net in 21 days. it says that when we select an ASP.NET web service application, a vsdisco file should be created automatically. this not
happen in our case. what r the other ways to find this disco file?
|
|
|
|
|
In VB, How do I check whether the string entered in the text box is a valid string & does not contain a numeric value?
|
|
|
|
|
Depends on how you define 'a valid string'.
This function returns false if one of the chars in the string is a number.
<br />
Private Function IsValid(ByVal myString As String) As Boolean<br />
Dim c As Char<br />
For Each c In myString<br />
If Char.IsNumber(c) Then<br />
Return False<br />
End If<br />
Next<br />
Return True<br />
End Function<br />
Instead Char.IsNumber(c) you can take several other static functions of Char to get your needed functionality.
|
|
|
|