Updating Dates in SQL-Server 7.0 Stored Proc thru VB. 
Author Message
 Updating Dates in SQL-Server 7.0 Stored Proc thru VB.

Ok folks, I have most of my problems hammered out, but two fields continue
to defy my attempts to get them to work.

In a SQL-Server 7.0 table, I have the following fields defined:

    EffectiveDate            datetime
    ExpireDate                datetime

In Visual Basic 6.0 I use the following lines for creation of the parameter:

Set paramEffective = cmdRider.CreateParameter("Input", adDate, adParamInput,
, ldTempEffective)
Set paramExpire = cmdRider.CreateParameter("Input", adDate, adParamInput,  ,
ldTempExpire)

When I run this stored procedure, I get the message:

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

I tried changing it to adDBDate, and I still recieve the same error. I have
also tried putting a length in the create parameter statement.

I can make the error statement go away, by changing the adDate to adVarChar
with a length of 12, but then the field values do not change.

Any ideas? Thoughts? comment? anything?

thank you.



Sun, 29 Jun 2003 06:19:18 GMT  
 Updating Dates in SQL-Server 7.0 Stored Proc thru VB.
The only thing I see wrong in your code snippet is that you have "Input" as
your parameter name for both parameters.  Otherwise, I am using adDate to
pass a DateTime data type to stored procs in my vb code.

Drew


Quote:
> Ok folks, I have most of my problems hammered out, but two fields continue
> to defy my attempts to get them to work.

> In a SQL-Server 7.0 table, I have the following fields defined:

>     EffectiveDate            datetime
>     ExpireDate                datetime

> In visual basic 6.0 I use the following lines for creation of the
parameter:

> Set paramEffective = cmdRider.CreateParameter("Input", adDate,
adParamInput,
> , ldTempEffective)
> Set paramExpire = cmdRider.CreateParameter("Input", adDate, adParamInput,
,
> ldTempExpire)

> When I run this stored procedure, I get the message:

> [Microsoft][ODBC SQL Server Driver]Optional feature not implemented.

> I tried changing it to adDBDate, and I still recieve the same error. I
have
> also tried putting a length in the create parameter statement.

> I can make the error statement go away, by changing the adDate to
adVarChar
> with a length of 12, but then the field values do not change.

> Any ideas? Thoughts? comment? anything?

> thank you.



Sun, 29 Jun 2003 07:03:17 GMT  
 Updating Dates in SQL-Server 7.0 Stored Proc thru VB.
I use input because they are input fields........or do the names need to be
different for each parameter?


Quote:
> The only thing I see wrong in your code snippet is that you have "Input"
as
> your parameter name for both parameters.  Otherwise, I am using adDate to
> pass a DateTime data type to stored procs in my vb code.

> Drew



> > Ok folks, I have most of my problems hammered out, but two fields
continue
> > to defy my attempts to get them to work.

> > In a SQL-Server 7.0 table, I have the following fields defined:

> >     EffectiveDate            datetime
> >     ExpireDate                datetime

> > In visual basic 6.0 I use the following lines for creation of the
> parameter:

> > Set paramEffective = cmdRider.CreateParameter("Input", adDate,
> adParamInput,
> > , ldTempEffective)
> > Set paramExpire = cmdRider.CreateParameter("Input", adDate,
adParamInput,
> ,
> > ldTempExpire)

> > When I run this stored procedure, I get the message:

> > [Microsoft][ODBC SQL Server Driver]Optional feature not implemented.

> > I tried changing it to adDBDate, and I still recieve the same error. I
> have
> > also tried putting a length in the create parameter statement.

> > I can make the error statement go away, by changing the adDate to
> adVarChar
> > with a length of 12, but then the field values do not change.

> > Any ideas? Thoughts? comment? anything?

> > thank you.



Sun, 29 Jun 2003 22:49:34 GMT  
 Updating Dates in SQL-Server 7.0 Stored Proc thru VB.
Try to ass date argument formatted "mm/dd/yyyy"

Rastko


Quote:
> Ok folks, I have most of my problems hammered out, but two fields continue
> to defy my attempts to get them to work.

> In a SQL-Server 7.0 table, I have the following fields defined:

>     EffectiveDate            datetime
>     ExpireDate                datetime

> In visual basic 6.0 I use the following lines for creation of the
parameter:

> Set paramEffective = cmdRider.CreateParameter("Input", adDate,
adParamInput,
> , ldTempEffective)
> Set paramExpire = cmdRider.CreateParameter("Input", adDate, adParamInput,
,
> ldTempExpire)

> When I run this stored procedure, I get the message:

> [Microsoft][ODBC SQL Server Driver]Optional feature not implemented.

> I tried changing it to adDBDate, and I still recieve the same error. I
have
> also tried putting a length in the create parameter statement.

> I can make the error statement go away, by changing the adDate to
adVarChar
> with a length of 12, but then the field values do not change.

> Any ideas? Thoughts? comment? anything?

> thank you.



Tue, 01 Jul 2003 18:17:58 GMT  
 Updating Dates in SQL-Server 7.0 Stored Proc thru VB.
got it...thanks


Quote:
> Try to ass date argument formatted "mm/dd/yyyy"

> Rastko



> > Ok folks, I have most of my problems hammered out, but two fields
continue
> > to defy my attempts to get them to work.

> > In a SQL-Server 7.0 table, I have the following fields defined:

> >     EffectiveDate            datetime
> >     ExpireDate                datetime

> > In visual basic 6.0 I use the following lines for creation of the
> parameter:

> > Set paramEffective = cmdRider.CreateParameter("Input", adDate,
> adParamInput,
> > , ldTempEffective)
> > Set paramExpire = cmdRider.CreateParameter("Input", adDate,
adParamInput,
> ,
> > ldTempExpire)

> > When I run this stored procedure, I get the message:

> > [Microsoft][ODBC SQL Server Driver]Optional feature not implemented.

> > I tried changing it to adDBDate, and I still recieve the same error. I
> have
> > also tried putting a length in the create parameter statement.

> > I can make the error statement go away, by changing the adDate to
> adVarChar
> > with a length of 12, but then the field values do not change.

> > Any ideas? Thoughts? comment? anything?

> > thank you.



Tue, 01 Jul 2003 23:31:17 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Date to SQL Server stored proc

2. Passing Null Date values to sql server stored proc

3. Problem on SQL-Update Statement with a Data-Control in VB 5 and SQL Server 7.0

4. SQL Server stored proc to VB Source generator

5. SQL Server stored proc to VB Source generator

6. SQL Server stored proc to VB Source generator

7. Store and retrieve image on SQL server 7.0 using VB 6.0

8. VB 3.0 with SQL SERVER 7.0 (Update, delete and Insert)

9. VB 3.0 with SQL SERVER 7.0 (Update, delete and Insert)

10. Insert date type varible through ODBC SQL server driver to SQL 7.0 database

11. Date parms to sql stored proc

12. Stored Proc Return values / Output Params w ADO and SQL Server 7

 

 
Powered by phpBB® Forum Software