|
-
Jan 24th, 2006, 03:51 AM
#1
Thread Starter
Member
Returning Parameters
I'm accessing an MS Access 2000 DB through VB6 within a module and I need to return a table's worth of fields (8 or so) back to the form tha is interfacing with the module. Since I'm used to work on VB.NET and need to do this on VB6 I'm completely lost.
-
Jan 24th, 2006, 03:56 AM
#2
Re: Returning Parameters
Have a search for ADOX...
-
Jan 24th, 2006, 03:58 AM
#3
Thread Starter
Member
Re: Returning Parameters
What is ADOX? I'm using ADODB and all I need to know is how VB6 returns data from functions
-
Jan 24th, 2006, 04:01 AM
#4
Re: Returning Parameters
Here is a quicky for you, reference Microsoft ADO 2.something Ext. for DDL and Security...
VB Code:
Private Sub Command1_Click()
Dim x As ADOX.Catalog
Dim y As New ADOX.Table
Set x = New ADOX.Catalog
x.ActiveConnection = connImport
Set y = x.Tables("ImpHBL")
MsgBox y.Columns.Count
End Sub
-
Jan 24th, 2006, 04:11 AM
#5
Thread Starter
Member
Re: Returning Parameters
If for example I had to have a Sub that generates an array in a module, can't I return that array to the form in anyway? this is what I need
-
Jan 24th, 2006, 04:39 AM
#6
Re: Returning Parameters
Subs don't return anything. Although you can use a function in a way similar to this
VB Code:
Public Function returnArray() As String()
Dim someArray(10) As String
Dim i As Integer
For i = 0 To 9
someArray(i) = "Value at : " & Str(i)
Next
returnArray = someArray
End Function
Public Sub main()
Dim returnedArray() As String
returnedArray = returnArray
End Sub
-
Jan 24th, 2006, 04:53 AM
#7
Thread Starter
Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|