Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error 3709 - Opening ADO Recordset

Status
Not open for further replies.

GummowN

Programmer
Jul 26, 2002
157
GB
See the below code

The Msboxes do kick up 3709 and the usual error description

Set mcnn = CreateObject("ADODB.Connection")
Set pkg = DTSGlobalVariables.Parent
Set tsk = pkg.Tasks("DTSTask_DTSExecuteSQLTask_11").CustomTask
Set fso = CreateObject("Scripting.FileSystemObject")
Set wsh = CreateObject("WScript.Shell")
Set rstFTP = CreateObject("ADODB.Recordset")
Set rstView = CreateObject("ADODB.Recordset")

' Open ADO connection with the UDL filename
mcnn.Open "File Name=" & DTSGlobalVariables.Parent.Connections("ProductControl").UDLPath
If Err.Number > 0 Or mcnn.Errors.Count > 0 Then
Msgbox "There is a problem connecting to the database"
Msgbox "UDLPath = " & DTSGlobalVariables.Parent.Connections("ProductControl").UDLPath.value
ReportError()
End if

' 1. Loop round the output table

' Loop around tbl_pf_sys_output
rstFTP.Open "tbl_pf_sys_export", mcnn, 3, 1, -1 ' Static cursor, read only lock, unspecified
If Err.Number > 0 Then

Msgbox err.number
Msgbox err.description
Msgbox "There was a problem"
ReportError()
End if

If at first you don't succeed, try for the answer.
 
Sorry:

1) VBScript running as part of DTS package on SQL Server

2) This is not the original code - all the Msgboxs have been added to figure out WTF is going on.

Thanks



If at first you don't succeed, try for the answer.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top