|
Michael Sync wrote: What about if you move the error handling in operation function?
Your_Main_Function()
operation 1
operation 2
operation 3
operation 4
...
operation n
End
Sub operation 1
on error goto errorhandling
errorhandling:
newthings
End sub
I dont think that would help, since operation 2 will be called whether or not there was an error in operation 1.
|
|
|
|
|
ChandraRam wrote: operation 2 will be called whether or not there was an error in operation 1
ya. i thought this is what he want. i'm not so sure what he wanna do..
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
Michael Sync wrote: ya. i thought this is what he want. i'm not so sure what he wanna do..
He wants to skip all other operations and jump to the label "error handling"... at least that's what I understand from his post
|
|
|
|
|
If he got some errors in any of those operations then he wanna jump to the label?? then, what wrong with his original code? I think it should work with his original code..
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
yup, thats exactly what i want to do. if an error occurs in one of the operations, then its of no sense to do all the others or even try them because they might fail as well.
lets say its a database operation, which copies from different tables to a new one which collects all together. so either everything is successful then we do have a comit and all data is stored in the new table and could be deleted in the old ones, or it is not, then we do have a "rollback" and no deleting. the comit and delete operation is done in the last few operations so thats why the operations have to be skipped. to summarize its something like
on error goto on_error
copy operation db1 to dbfinal
copy operation db2 to dbfinal
.....
copy operation dbn to dbfinal
try commit and delete db entries in db1 to dbn
on_error:
continue with the next entry
but as i said in my first posting the compiler throws an error message at the "goto label" statement.
so you think it should have worked this way? but why does the compiler throw an error message "unknown symbol at line xx position yy". this position is where the labelname starts.
does anyone of you have an idea? or has anyone of you tried anything similar? because it still doesn't work here.
thanks.
stephan.
|
|
|
|
|
hi all
i have a datagridview with three columns.
the first column contains checkboxes, the two and three contains text.
the selection mode is fullrowselect.
my problem is that, when multiple columns are selected while keeping the shift key pressed and then space is pressed with shift key all the checkboxes are supposed to be selected.
i tried the code
<br />
If flagShift = True And e.KeyCode = Keys.Space Then<br />
If DataGridView2.SelectedRows.Count > 1 Then<br />
For i As Integer = 0 To DataGridView2.Rows.Count - 1<br />
If DataGridView2.Rows(i).Selected = True Then<br />
If DataGridView2.Rows(i).Cells(0).Value = True Then<br />
DataGridView2.Rows(i).Cells(0).Value = False<br />
Else<br />
DataGridView2.Rows(i).Cells(0).Value = True<br />
End If<br />
End If<br />
Next<br />
End If<br />
End If<br />
but that will check all the checkboxes except the last one. the last one remains unchecked.
thanks in advance.
help everyone
|
|
|
|
|
Yah, I hate this problem and I hope you get a better solution than mine. I created an additional checkbox below the gridview called checkselected.
It has 2 operations:
if there are no rows selected then it forces EVERY row to have its checked value.
If there is 1 or more selected rows it forces the seleced rows to have the checkbox value.
Quote from Great Outdoors:
its a confident traveller who farts in India
|
|
|
|
|
Hi Freinds,
I m working in vb 6.0
I m open a folder from vb but user can move up or down by address bar
so i want to hide or disalbe windows address bar of that folder.
currently for open folder i m using shell function..
Please help me, How can I open folder without address bar (Windows Application).
Thank you
-- modified at 9:56 Thursday 22nd November, 2007
|
|
|
|
|
I think it is not possible to do that. All you can do is that you can have one form that looks similar to window explorer and show this form instead of opening the folder from VB program.
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
I want to make a chart in Visual Basic 6.0 but I don't want to make it myself. I want it to be imported from Excel for example, but not as a picture. I want it to be dynamic, that means if I chance some data in my data base, the chart will also change.
Thanks!
|
|
|
|
|
Never heard about? If you have Excel then you have it.
See for instance [^], I know it talk about VBA, anyway...
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.
|
|
|
|
|
Thank you very much Pallini. I managed to make a chart in Word with Visual Basic, by introducing data to chart from my database. But I want to load the chart created in that Word Document in a form in Visual Basic; I don't want to view the chart created in Word, but in Visual Basic.
Can't I create a dinamic chart direct in Visual Basic without using Word or other aplication?
Thank you very much!!
|
|
|
|
|
Hi,
i have created one Chat application where user can send message to other users on the network but right now i am specifying the ip address manually.
So,i want to get Ip asdress of all the machines which are on network.
Pls send me the code if u know this.
Girish
|
|
|
|
|
There's no way to get the list, other than pinging each IP address in the range you want. Even then, that won't get you a list of available clients. You have to try to connect to each of the live IP address to see if a client is listening. This process will take quite a long time to get through any list of addresses.
A better solution would be to have a central server that all the clients check into. This server would then be able to share the known available clients list with all the other clients.
|
|
|
|
|
|
Hi,
Anyone knows how to use login control and how to connect it with the SQl server 2005 and connect to the table within my application database. So it can match the values from the table I have already created in my database.
Rock Star
|
|
|
|
|
|
hi everyone
dears i have created a setup project but while deploying i must install dotnet framework 1.1 and its service pack 1
is there any way that only single setup install all these things ??
Salman Sheikh
|
|
|
|
|
You cannot install it as part of your .MSI setup project. It has to be isntalled seperately. You'd normally have a Setup.exe that your user launches and this .EXE checks for the .NET Framework and installs it if necessary, then lanuches your app's .MSI setup. Google for ".net setup bootstrap[^]" for examples.
|
|
|
|
|
Hi
I have developed an application using WebBrowser control.
In this application the user visits web-sites in WebBrowser control.
Whichever sites he is visiting I am recording all sites along with PostData, Url and Frame information in the collection object.
I’ve kept option to replay the user’s visits. If user wants to see the pages he has visited then he can replay the websites using Replay button.
But I am facing the problems while replaying in following scenarios.
1.If user is visiting the pages and doing steps within same page, ie. He is navigating such that the page remains
same only the data in frames of the page changes. In this case during replay only the page is displayed
while the steps user has done are not displayed.
2.If user is downloading any file from website then while replay that download-file step is not replayed.
Please tell me what can be solution for these problems.
Abhishek J
|
|
|
|
|
hii
How to convert 11/06/2007 to "06-nov-2007". in vb.net ?
|
|
|
|
|
DateTime.TryParse then one of the DateTime to string methods.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
hi,
Thanks For reply .
I got the solution ,Directly we can use
Date.Today.ToString("d-MMM-yyyy") to get the way we want
DVS
|
|
|
|
|
Hi guys,
I really need help...
I'm searching for a VB or VBScript code that can print PDF files... I've searched and tried lots of VB code available in the net but none of them works. Or maybe I just don't know how to run them.
Kindly help me about this issue... I'm not really a VB guy but I'm required to used this language. I'm also looking forward to study this language and your guidance will be a great help.
Please give a me functional code that you have tried.
Your help will be highly appreciated
Mon Magallanes
|
|
|
|
|
You need some kind of component to do the printing for you. There is nothing in VB6 or VBScript that can do this on it own.
monmagallanes wrote: I've searched and tried lots of VB code available in the net but none of them works. Or maybe I just don't know how to run them.
If you haven't been able get these to work, how are we going to explain it to you so you understand it?? We'll be telling you the exact same thing you've already seen.
monmagallanes wrote: Please give a me functional code that you have tried.
There's no chance of this happening. CP is here to help you with your own code, not write it for you. Besides, without the components to do the printing, like Acrobat Reader, any code anyone gives you is worthless.
|
|
|
|