Click here to Skip to main content
15,915,163 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: set and new Pin
hmklakmal19-Jan-06 4:14
hmklakmal19-Jan-06 4:14 
GeneralRe: set and new Pin
ns19-Jan-06 5:44
ns19-Jan-06 5:44 
AnswerRe: set and new Pin
Dave Kreskowiak19-Jan-06 7:09
mveDave Kreskowiak19-Jan-06 7:09 
AnswerRe: set and new Pin
Joshua Quick19-Jan-06 8:12
Joshua Quick19-Jan-06 8:12 
GeneralRe: set and new Pin
shiroamachi19-Jan-06 14:52
shiroamachi19-Jan-06 14:52 
GeneralRe: set and new Pin
Joshua Quick19-Jan-06 16:00
Joshua Quick19-Jan-06 16:00 
GeneralRe: set and new Pin
shiroamachi19-Jan-06 16:57
shiroamachi19-Jan-06 16:57 
GeneralRe: set and new Pin
Steve Pullan19-Jan-06 17:39
Steve Pullan19-Jan-06 17:39 
shiroamachi wrote:
assume there's error in con.open() and the error was catch and then do finally. in finally, because of rs is not yet open, will cause error cant close object that isnt open. How to resolve this problem?


First, put the DIM statements before the Try since the variables won't have scope outside the Try block.

Second, in the Catch block determine whether or not the Connection object is open by using something like this:

if con.State = adStateOpen then
   con.Close()
end if


I did this from memory so you'll need to check the exact syntax.


...Steve

"Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life."
(Translation: I'll show you the way, but not write the code for you.) I read that somewhere once Smile | :)
GeneralRe: set and new Pin
Joshua Quick20-Jan-06 6:59
Joshua Quick20-Jan-06 6:59 
QuestionHow To Prevent Datagrid Row Deletion Pin
Anupbala19-Jan-06 2:56
Anupbala19-Jan-06 2:56 
Questionupload data from win-app vb.net Pin
tnky19-Jan-06 2:30
tnky19-Jan-06 2:30 
AnswerRe: upload data from win-app vb.net Pin
tnky19-Jan-06 3:27
tnky19-Jan-06 3:27 
QuestionManually Enter Items in Combo Pin
Rana Muhammad Javed Khan19-Jan-06 1:09
Rana Muhammad Javed Khan19-Jan-06 1:09 
QuestionExploring Windows Pin
Osama12319-Jan-06 1:05
Osama12319-Jan-06 1:05 
AnswerRe: Exploring Windows Pin
hmklakmal19-Jan-06 4:19
hmklakmal19-Jan-06 4:19 
AnswerRe: Exploring Windows Pin
Dave Kreskowiak19-Jan-06 7:06
mveDave Kreskowiak19-Jan-06 7:06 
QuestionLabel Printing Pin
cberam19-Jan-06 0:51
cberam19-Jan-06 0:51 
AnswerRe: Label Printing Pin
Dave Kreskowiak19-Jan-06 6:20
mveDave Kreskowiak19-Jan-06 6:20 
QuestionPleaaaaaaaase help??!! Pin
flashmemory19-Jan-06 0:36
flashmemory19-Jan-06 0:36 
AnswerRe: Pleaaaaaaaase help??!! Pin
Ritesh123419-Jan-06 1:03
Ritesh123419-Jan-06 1:03 
AnswerRe: Pleaaaaaaaase help??!! Pin
Dave Kreskowiak19-Jan-06 6:19
mveDave Kreskowiak19-Jan-06 6:19 
QuestionSerious Problem on Memory Usage Pin
cylix200018-Jan-06 23:24
cylix200018-Jan-06 23:24 
AnswerRe: Serious Problem on Memory Usage Pin
Owner drawn19-Jan-06 0:33
Owner drawn19-Jan-06 0:33 
AnswerRe: Serious Problem on Memory Usage Pin
Dave Kreskowiak19-Jan-06 6:14
mveDave Kreskowiak19-Jan-06 6:14 
GeneralRe: Serious Problem on Memory Usage Pin
cylix200019-Jan-06 13:57
cylix200019-Jan-06 13:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.