| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
|  |  | |||
Home -> Community -> Usenet -> c.d.o.tools -> Re: What is a 'Restricted data type attribute violation' error mean?
Thank you!
"TurkBear" <noone_at_nowhere.com> wrote in message news:1mpfhtg9iq7kgbmqghtpjguhqtti41190j_at_4ax.com...
The only time I have seen this error, I changed the ODBC driver I was using
and
it went away..
Be sure your ODBC driver for Oracle matches the version of your database...
"Scott Pawluk" <spawluk_at_nospam.city.winnipeg.mb.ca> wrote:
>I can't find anything on Oracle's website about this....
>
>What in god's name is it?
>
>For those experienced with Visual Basic, below is the code that is causing
>it:
>
>(Please note... Per_Test_1 & Perf_Test_2 work without problems.... It's
>Perf_Test_3 that fails with an error from Oracle:
>'Restricted data type attribute violation'
>
>Please respond directly by removing the nospam. from my email.
>
>Thanks,
>
>Scott Pawluk
>Programmer
>City of Winnipeg
>
>===========================================================================
 =
>===================
>
>
>Private Sub Main()
>    Dim StartTime(1 To 3) As Date, EndTime(1 To 3) As Date
>    Per_Test_1 StartTime(1), EndTime(1)
>    Per_Test_2 StartTime(2), EndTime(2), "A%"
>    Per_Test_3 StartTime(3), EndTime(3), "A%"
>
>    Debug.Print StartTime(1) & " | " & EndTime(1)
>    Debug.Print StartTime(2) & " | " & EndTime(2)
>    Debug.Print StartTime(3) & " | " & EndTime(3)
>End Sub
>
>Private Sub Amanda_Property_1(StartTime As Date, EndTime As Date)
>    Dim SQLString As String
>    Dim TempWS As Workspace, TempCon As Connection, TempQD As QueryDef,
>TempRS As Recordset
>
>    SQLString = "SELECT COUNT(*)" + vbCrLf
>    SQLString = SQLString + "FROM SCHEMA.TABLE" + vbCrLf
>
>    StartTime = Now
>
>    Set TempWS = CreateWorkspace("Temporary", "USER", "PASSWORD",
 dbUseODBC)
>    Set TempCon = TempWS.OpenConnection("DSNNAME")
>    Set TempQD = TempCon.CreateQueryDef()
>    TempQD.SQL = SQLString
>    Set TempRS = TempQD.OpenRecordset(, dbSQLPassThrough)
>
>    While Not (TempRS.EOF)
>        Debug.Print "Record Count: " & TempRS.Fields(0)
>        TempRS.MoveNext
>    Wend
>
>    TempRS.Close
>    TempQD.Close
>    TempCon.Close
>    TempWS.Close
>
>    EndTime = Now
>End Sub
>
>Private Sub Amanda_Property_2(StartTime As Date, EndTime As Date,
 LikeClause
>As String)
>    Dim SQLString As String
>    Dim TempWS As Workspace, TempCon As Connection, TempQD As QueryDef,
>TempRS As Recordset
>
>    SQLString = "SELECT COUNT(*)" + vbCrLf
>    SQLString = SQLString + "FROM SCHEMA.TABLE" + vbCrLf
>    SQLString = SQLString + "WHERE COLUMN LIKE ?"
>
>    StartTime = Now
>
>    Set TempWS = CreateWorkspace("Temporary", "USER", "PASSWORD",
 dbUseODBC)
>    Set TempCon = TempWS.OpenConnection("DSNNAME")
>    Set TempQD = TempCon.CreateQueryDef()
>    TempQD.SQL = SQLString
>
>    TempQD.Parameters(0) = LikeClause
>
>    Set TempRS = TempQD.OpenRecordset(, dbSQLPassThrough)
>
>    While Not (TempRS.EOF)
>        Debug.Print "Record Count: " & TempRS.Fields(0)
>        TempRS.MoveNext
>    Wend
>
>    TempRS.Close
>    TempQD.Close
>    TempCon.Close
>    TempWS.Close
>
>    EndTime = Now
>End Sub
>
>Private Sub Amanda_Property_3(StartTime As Date, EndTime As Date,
 LikeClause
>As String)
>    Dim SQLString As String
>    Dim TempWS As Workspace, TempCon As Connection, TempQD As QueryDef,
>TempRS As Recordset
>    Dim TempFld As Field, RecordString As String
>
>    SQLString = "SELECT *" + vbCrLf
>    SQLString = SQLString + "FROM SCHEMA.TABLE" + vbCrLf
>    ' Commented out: SQLString = SQLString + "WHERE COLUMN LIKE ?"
>
>    StartTime = Now
>
>    Set TempWS = CreateWorkspace("Temporary", "USER", "PASSWORD",
 dbUseODBC)
>    Set TempCon = TempWS.OpenConnection("DSNNAME")
>    Set TempQD = TempCon.CreateQueryDef()
>    TempQD.SQL = SQLString
>
>    ' Commented out: TempQD.Parameters(0) = LikeClause
>
>    Set TempRS = TempQD.OpenRecordset(, dbSQLPassThrough)
>
>    While Not (TempRS.EOF)
>        RecordString = ""
>        For Each TempFld In TempRS.Fields
>            RecordString = RecordString & TempFld
>        Next TempFld
>        Debug.Print RecordString
>        TempRS.MoveNext
>    Wend
>
>    TempRS.Close
>    TempQD.Close
>    TempCon.Close
>    TempWS.Close
>
>    EndTime = Now
>End Sub
>
>
Received on Fri Jun 01 2001 - 16:26:53 CDT
|  |  |