Click here to Skip to main content
15,900,258 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Multi Column List box Pin
Christian Graus11-Jun-08 12:36
protectorChristian Graus11-Jun-08 12:36 
AnswerRe: Multi Column List box Pin
Rupesh Kumar Swami12-Jun-08 2:39
Rupesh Kumar Swami12-Jun-08 2:39 
QuestionIgnoring Text Entered into a ComboBox Pin
td298511-Jun-08 12:25
td298511-Jun-08 12:25 
AnswerRe: Ignoring Text Entered into a ComboBox Pin
BDEz (Member 3919223)12-Jun-08 10:18
BDEz (Member 3919223)12-Jun-08 10:18 
QuestionOT: remove write protection of a file via vbs Pin
stephan_00711-Jun-08 10:41
stephan_00711-Jun-08 10:41 
AnswerRe: OT: remove write protection of a file via vbs Pin
jzonthemtn11-Jun-08 10:56
jzonthemtn11-Jun-08 10:56 
GeneralRe: OT: remove write protection of a file via vbs Pin
stephan_00711-Jun-08 11:17
stephan_00711-Jun-08 11:17 
QuestionVbscript Class Problem Pin
SteveS83200111-Jun-08 5:25
SteveS83200111-Jun-08 5:25 
I am not sure what I need to do to get this done, so Be nice.




First off some background Info

I am creating a Class in a Windows Scripting Component File (.WSC), that will
connect to a DB and run Querys for me.

Then I will use a Vbscript and reference the WSC file to it, and call the functions.



On my Script, I will call the Function OpenDBConnection() (which sets up the connection to the DB).

How do I pass the connection from OpenDBConnection to the Function GetSomethingDone() from the script that called OpenDBConnection()

Class SQLDBQuery
	Private objSQLConn
	
	Private Sub Class_Initialize
		Set objSQLConn = CreateObject("ADODB.Connection")
	End Sub
	
	Public Function OpenDBConnection(strDomainController)
		Dim strDBPath
		
		strDBPath = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strDomainController & "netlogon\user.mdb"
		
		objSQLConn.Open strDBPath
		
		Set OpenDBConnection = objSQLConn
	End Function

        Function GetSomethingDone

        Do something Here....

        End Function
	
	
	
	
	
End Class

Private objSQLDBQuery
Set objSQLDBQuery = New SQLDBQuery

Function OpenDBConnection(strDomainController)
	Set objSqlConnection = objSQLDBQuery.OpenDBConnection(strDomainController)
	Set OpenDBConnection = objSqlConnection
End Function








AnswerRe: Vbscript Class Problem Pin
SteveS83200111-Jun-08 5:52
SteveS83200111-Jun-08 5:52 
QuestionDraw a Rhombus Pin
Mohammad Al Hoss11-Jun-08 5:11
Mohammad Al Hoss11-Jun-08 5:11 
AnswerRe: Draw a Rhombus PinPopular
Christian Graus11-Jun-08 5:23
protectorChristian Graus11-Jun-08 5:23 
AnswerRe: Draw a Rhombus PinPopular
Christian Graus11-Jun-08 6:01
protectorChristian Graus11-Jun-08 6:01 
Questionform question Pin
sa_runner11-Jun-08 4:59
sa_runner11-Jun-08 4:59 
AnswerRe: form question Pin
Mohammad Al Hoss11-Jun-08 5:09
Mohammad Al Hoss11-Jun-08 5:09 
AnswerRe: form question Pin
John_Adams11-Jun-08 5:12
John_Adams11-Jun-08 5:12 
AnswerRe: form question Pin
sa_runner11-Jun-08 5:46
sa_runner11-Jun-08 5:46 
Questionchatting in lan Pin
pekhaleyogesh11-Jun-08 3:59
pekhaleyogesh11-Jun-08 3:59 
AnswerRe: chatting in lan Pin
John Ad11-Jun-08 4:16
John Ad11-Jun-08 4:16 
AnswerRe: chatting in lan Pin
~Khatri Mitesh~11-Jun-08 4:26
~Khatri Mitesh~11-Jun-08 4:26 
QuestionTranslating .rdlc reports Pin
FvanLog11-Jun-08 3:15
FvanLog11-Jun-08 3:15 
QuestionReports help - new to VS2008 Standard Pin
penguin500011-Jun-08 2:10
penguin500011-Jun-08 2:10 
QuestionCheck box getting unchecked while sorting column in datagridview Pin
hisuman10011-Jun-08 1:18
hisuman10011-Jun-08 1:18 
AnswerRe: Check box getting unchecked while sorting column in datagridview Pin
C1AllenS11-Jun-08 5:08
C1AllenS11-Jun-08 5:08 
GeneralRe: Check box getting unchecked while sorting column in datagridview Pin
hisuman10013-Jun-08 0:45
hisuman10013-Jun-08 0:45 
QuestionVBA (Excel) filter by date Pin
progDes11-Jun-08 0:13
progDes11-Jun-08 0:13 

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.