OPen error

  • oRecordset.open strSQL, oConnection

    Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.

     

    Any idea what might cause this?

    strSQL hold an SQL I built as follows:

    Dim strSQL

     strSQL = "select AuthorizationNumber from REPRICE_AuthNumbers where AuthorizationNumber = " + DTSSource("Authorization#")

  • I always try to use the SET oRecordset = oConnection.Execute(strSQL) - seems to give me less headaches.

  • It's probably your connection object. Is it open? What are it's properties?

  • Line:  oRecordset.open strSQL, oConnection

    Error:  Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.

    Connection 2 is a connection already setup ... it happens to be the connection for the target system.  SQLSERVER local

    Dim oConnection

    Dim oRecordset

    Dim strSQL

    SET oConnection = DTSGlobalVariables.parent.connections("Connection 2")

    SET oRecordset = CreateObject("ADODB.Recordset")

    strSQL = "select SSN from REPRICE_SSNs where SSN = " + DTSSource("SSN#")

    oRecordset.open strSQL, oConnection

    if oRecordset.Eof then

      Main = DTSTransformStat_SkipRow

    else

    ...

  • I'm not into DTS but this error comes, for example, when CursorLocation and CursorType are incompatible. I suggest that you lok at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/mdobjconnection.asp

  • I'm not sure I understand the context of your connection (ASP, ASP/Net, etc.), but here is a MS KB article that may help:

    http://support.microsoft.com/default.aspx?scid=kb;EN-US;254517

     

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply