|
A text box contains text - if you enter numbers in it and assign to a numeric field, VB will do an automatic conversion, but what happens if the text contains characters other than numbers? Converting the text to value is always a good idea when assigning to number type fields.
And an empty string is not a null value...
Hope this helps
|
|
|
|
|
Meaning that my code is correct i just need to make some conversions.?and please can you pleae comment on myConnection and my indivisual buttons , where should i improve and what is safe. Advice.
Thanks Man
Vuyiswa
|
|
|
|
|
i have managed to add data and save it, but whe i click on cmdPrevious
it show me this Error
"Row handles must all be relaeased before new ones can be obtained" hence this is a big database , did it save the record? and why that Error.
The code for First and Previous
Private Sub cmdPrevious_Click()
rrs.MovePrevious
If rrs.BOF = True Then
rrs.MoveFirst
End If
End Sub
Private Sub cmdFirst_Click()
rrs.MoveFirst
End Sub
and i get an Error when i try to Delete
"Either BOE or EOF is true or the Current Record has been Deleted Request Operation Requires Current record."
What suprises me is that i was scrolling through the recordset and i came across the blank record, so i was trying to delete it.Below is the code for delete
Private Sub cmdDelete_Click()
On Error GoTo DeleteErr
With rrs
.Delete
.MoveNext
If .EOF Then .MoveLast
End With
Exit Sub
DeleteErr:
MsgBox Err.Description
End Sub
Thank once more
Vuyiswa
|
|
|
|
|
hi,
i want to set the icon of my exe but a error arise for a particular image . Error is below
Error 1 Unable to write to output file 'C:\Documents and Settings\admin\Desktop\WindowsApplication1\WindowsApplication1\obj\Debug\WindowsApplication1.exe': The specified image file did not contain a resource section.
when i use favorites.ico file then above error occured but if i replace this icon file to other icon file then my application is running successfully. i have no idea about this error
thanks in advance
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
|
|
|
|
|
the file you are choosing, may be corrupted or some sort of fragmentation must have occurred...
|
|
|
|
|
The icon file isn't valid. There are a couple of applications out there that do NOT generate the proper format for an .ICO file, though, I can't remember what they are. This problem has come up before. The users ended up using a different package to create their icons.
|
|
|
|
|
hi.........
i want response very quickly if any one knows the ans for this query respond quickly....
i have two menus one is file menu and another is data menu
in file------>sub menu is load....there i used openfiledialog to select a particular file from the disk
and in data------->sub menu is run....there i used combo box in that i want the selected file which i already selected in load ..
is it possible .......using vb.net
thanks & regards.
-- modified at 1:52 Thursday 17th May, 2007
|
|
|
|
|
Please
1 - use meaningful headers. Hi..... doesn't cut it
2 - don't ask twice. Respond to one of the answers in your first post if you want to clarify or ask more
Now that you've described it, you just need to store the the filenames that have been selected before. It's a type of MRU, as far as I can see. Of course it is possible. Just decide where you want to store old file paths ( config file, registry, etc )
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 )
|
|
|
|
|
I was running an exe .
Now my question is , Can i programatically check whether the exe has been executed completely.
Does the framework class
System.Diagnosis.process has anything to do with the remedy of this problem?
|
|
|
|
|
well,you could enclose it in a try ..... catch and get the message of the exception and find out,if there is no exception message,then the file would have been executed 'completely'
|
|
|
|
|
is there ant alternative way out ?
once the program enters into the catch block.it takes time to complete the execution.thus increases the access time.
|
|
|
|
|
if you use a generic exception such as "Exception" it will take a lot of time,to reduce that time you have to choose a more specific exception.The more generic your exception,the more longer the processing time.So its a compromise between Accuracy and Speed.
|
|
|
|
|
i actually do not know how to check whether the particular exe has been executed completely.
|
|
|
|
|
What do you mean by "execute completely"?? Are you asking if the child process terminates? Are you looking for an exit code? A file waiting to be written?? What?
|
|
|
|
|
Is there a way to determine when i'm in runmode in vb6. I don't want to subclass a window when it is in design mode.
|
|
|
|
|
There's a way to determine when the program is running in the VB IDE context.
Are you asking for this?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
yes (i think). I have a usercontrol and in there i subclassed one of the constituent controls, but I only want this subclassing if i'm running and not while it is sited on a container in the design mode.
|
|
|
|
|
lee23 wrote: I have a usercontrol
Do you mean an ActiveX control?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
It's been a very long time since I've used VB6. But, I can't seem to recall if there was a property to tell if you're running in design mode or not. I don't think there is, but I could be wrong.
|
|
|
|
|
' code from Brad Buchanan
Public IsIDE As Boolean
Private Sub Form_Load()
IsIDE = False
'This line is only executed if
'running in the IDE and then
'returns True
Debug.Assert CheckIDE
'Use the IsIDE flag anywhere
If IsIDE Then
MsgBox ("Running under IDE")
Else
MsgBox ("Running as EXE")
End If
End Sub
Private Function CheckIDE() As Boolean
'This function will never be executed in an EXE
IsIDE = True 'set global flag
'Set CheckIDE or the Debug.Assert will Break
CheckIDE = True
End Function
|
|
|
|
|
I've tried this already and it doesn't do what i want. I want to know when my activex control is in run mode or design mode b/c i only want to do the subclassing when it is in run mode.
|
|
|
|
|
Sorry, I misunderstood.
Public gbDesignTime As Boolean<br />
<br />
Private Sub SetMode<br />
On Error Resume Next<br />
gbDesignTime = Not (Ambient.UserMode)<br />
If (Err.Number <> 0) Then gbDesignTime = False<br />
<br />
On Error GoTo 0<br />
Debug.Print "Design time = " & gbDesignTime<br />
End Sub
|
|
|
|
|
hi.......
how to link two menus items using vb.net
thanks & regards.
|
|
|
|
|
Link them to what ? In what way ?
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 )
|
|
|
|
|
let the first menu item be item1 and the second be item2,then,write this in the click event sub of the first item
item2.performClick()
This way item1 is linked to item2,ie,if you click on item1 it will perform the click event code of item . Is this what you wanted to know?or is it something else?
|
|
|
|