Updating Dates in SQL-Server 7.0 Stored Proc thru VB.
Author |
Message |
Mr. Obviou #1 / 5
|
 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 |
|
 |
Drew Montgomer #2 / 5
|
 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 |
|
 |
Mr. Obviou #3 / 5
|
 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 |
|
 |
Rastko Potocni #4 / 5
|
 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 |
|
 |
Mr. Obviou #5 / 5
|
 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 |
|
|
|