Optional feature not implemented... 
Author Message
 Optional feature not implemented...

Hi,

I'm trying to use ADO parameters and SQL Server (6.5 and 7.0). The
problem seems to be that  the parameter objects aren't implemented...

I have included a small example that produces this error message.

sDSN, sUID and sPWD are global variables. The database is sql server and
I have made a table into it that has only a timestamp column and some
entries into it...

I use a string and convert it to a date with CDate(). The date format I
use is d.M.yyyy HH:mm:ss.

I'm using ADO 2.0 (I presume I have the SP1 for it but it doesn't show
anywhere), SQL Server 7.0b3, ODBC Driver for SQL Server version
3.70.0517 and VB6.0 (also with some SPs...)

Am I doing something wrong here? If I'm doing then why does it work with
Access? And I have once tried it on Oracle with success...

If anyone can shed some light to this matter I'd appreciate it,

        Kai Hietala

----------
    Dim Conn As ADODB.Connection: Set Conn = New ADODB.Connection
    Dim Comm As ADODB.Command: Set Comm = New ADODB.Command
    Dim Para As ADODB.Parameter: Set Para = New ADODB.Parameter
    Dim Reco As ADODB.Recordset
    Dim tTime As String

    tTime = "6.4.1999 18:10:00"

    Conn.ConnectionString = "Data Source=" & sDSN & ";User ID=" & _
        sUID & ";Password=" & sPWD
    Conn.Open

    Set Comm.ActiveConnection = Conn
    Comm.CommandText = "select COUNT(*) from MEMO where TIMESTMP > ?"
    Comm.CommandType = adCmdText

    Set Para = Comm.CreateParameter(, adDate)
    Para.Value = CDate(tTime)
    Comm.Parameters.Append Para
    Set Reco = Comm.Execute

    If Not Reco.EOF Then
        MsgBox "Found " & Reco.Fields(0) & " rows."
    Else
        MsgBox "Error?"
    End If
----------



Sat, 22 Sep 2001 03:00:00 GMT  
 Optional feature not implemented...
Hi,

I've had the same problem. It's because you are using a Date parameter. All
other types work fine. Unfortunately, i've not found the correct way to do
this yet.
I now solved it Q&D by using a string as date and converting it to a datime
within the query itself. That way you can just use adVarChar.

Grtz,
Raimond Brookman


Quote:
> Hi,

> I'm trying to use ADO parameters and SQL Server (6.5 and 7.0). The
> problem seems to be that  the parameter objects aren't implemented...

> I have included a small example that produces this error message.

> sDSN, sUID and sPWD are global variables. The database is sql server and
> I have made a table into it that has only a timestamp column and some
> entries into it...

> I use a string and convert it to a date with CDate(). The date format I
> use is d.M.yyyy HH:mm:ss.

> I'm using ADO 2.0 (I presume I have the SP1 for it but it doesn't show
> anywhere), SQL Server 7.0b3, ODBC Driver for SQL Server version
> 3.70.0517 and VB6.0 (also with some SPs...)

> Am I doing something wrong here? If I'm doing then why does it work with
> Access? And I have once tried it on Oracle with success...

> If anyone can shed some light to this matter I'd appreciate it,

> Kai Hietala

> ----------
>     Dim Conn As ADODB.Connection: Set Conn = New ADODB.Connection
>     Dim Comm As ADODB.Command: Set Comm = New ADODB.Command
>     Dim Para As ADODB.Parameter: Set Para = New ADODB.Parameter
>     Dim Reco As ADODB.Recordset
>     Dim tTime As String

>     tTime = "6.4.1999 18:10:00"

>     Conn.ConnectionString = "Data Source=" & sDSN & ";User ID=" & _
>         sUID & ";Password=" & sPWD
>     Conn.Open

>     Set Comm.ActiveConnection = Conn
>     Comm.CommandText = "select COUNT(*) from MEMO where TIMESTMP > ?"
>     Comm.CommandType = adCmdText

>     Set Para = Comm.CreateParameter(, adDate)
>     Para.Value = CDate(tTime)
>     Comm.Parameters.Append Para
>     Set Reco = Comm.Execute

>     If Not Reco.EOF Then
>         MsgBox "Found " & Reco.Fields(0) & " rows."
>     Else
>         MsgBox "Error?"
>     End If
> ----------



Wed, 10 Oct 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Error -2147217887 [Microsoft][ODBC SQL Server Driver]Optional feature not implemented ,

2. Error -2147217887 [Microsoft][ODBC SQL Server Driver]Optional feature not implemented ,

3. Error -2147217887 [Microsoft][ODBC SQL Server Driver]Optional feature not implemented ,

4. Optional feature not implemented???

5. HELP! Optional feature not implemented error

6. OPTIONAL FEATURE NOT IMPLEMENTED

7. Error-Optional Feature not Implemented (ODBC Access)

8. [ODBC SQL Server Driver]Optional feature not implemented

9. Error "optional features not implemented"

10. PB: Implementing a function with optional string parameters

11. Implement register feature via Internet

12. Implemented Features

 

 
Powered by phpBB® Forum Software