PC Review


Reply
 
 
rigoberto perez
Guest
Posts: n/a
 
      26th Aug 2003
I need use the function SQLopen, but I receive the
message "Sub or function not defined".
Do You now How to set uop microsoft visul basic to allow
use that function?

Thanks
 
Reply With Quote
 
 
 
 
William Ryan
Guest
Posts: n/a
 
      26th Aug 2003
Roberto:

There shouldn't be a problem per se. It'd help if you
posted your exact code... but if you define something
like this...My guess is that the function call or the
function signature are different, there may be a
misspelling.


Public Function SQLopen(ByVal SomeParam) as Boolean
'For instance
Dim cn as New SqlConnection(myConnectSTring)
Try
If cn.State <> ConnectionState.Open then cn.Open
Return true
Catch ex as SqlException
Return False
Finally
If cn.State <> COnnectionState.Closed then cn.Close
cn.Dispose ' Or whatever cleanup you want to initiate
End Try


End Function

'Fill in your parameter list and return type as
appropriate.

I have a lot of other code in there just for
illustration, but as long as the call and the signature
match, and they are both in the same module or have
accessible scope, it should work. If the spelling is
correct, is this a method of another class by any
chance? If it's a shared method, have you prefaced the
method call correctly? I suspect one of these is the
problem, but if you post the code, we can probably figure
it out.

Cheers,

Bill


W.G. Ryan
(E-Mail Removed)
www.knowdotnet.com
>-----Original Message-----
>I need use the function SQLopen, but I receive the
>message "Sub or function not defined".
>Do You now How to set uop microsoft visul basic to allow
>use that function?
>
>Thanks
>.
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to apply SQLOpen Function - Excel 2007 Edwin Can Microsoft Excel Programming 0 15th Nov 2008 11:58 AM
SQLOpen VBA Jeff Microsoft Excel Programming 2 3rd Feb 2004 01:45 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:08 PM.