|
-
Nov 14th, 2000, 02:49 PM
#1
O.K. can someone give me an example of code on how to pass a variable to a sql stored procedure and execute the procedure to return a recordset...I'm having problems finding good text books to help with a lot of questions, any suggestions? I'm running sql7.0 as my back end and vb6.0
as my front
-
Nov 14th, 2000, 05:10 PM
#2
[/code]
Function Get_Unique_Source_Values(SourceDBS As String, _
SourceTBL As String, _
SourceVAR As String, _
TargetUNC As String, _
TargetENC As String, _
Local_Source_Table As String) As String
Dim sql As String
sql = "SELECT DISTINCT cstr([" & SourceTBL & "].[" & SourceVAR & "])"
sql = sql & " AS [" & TargetUNC & "], NULL AS [" & TargetENC & "]"
sql = sql & " INTO [" & Local_Source_Table & "]"
sql = sql & " FROM [" & SourceTBL & "]"
sql = sql & " IN '" & SourceDBS & "'"
sql = sql & " WHERE [" & SourceTBL & "].[" & SourceVAR & "] is not null"
sql = sql & ";"
Xit_Add_New_Values_To_Target:
Get_Unique_Source_Values = sql
End Function
[/code]
Is this what you're looking for?
Hope it helps.
DerFarm
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
|