Re: DateTime Error :: Implicit Conversion
am 06.09.2005 19:12:19 von jason
> If you provide your CREATE TABLE script (just the relevant columns) and
> the
> CREATE PROCEDURE script I will try to reproduce your symptoms,
Thanks Bob. Let me know if I have done this correctly. One thing: Is it
possible that one of the values higher up in the stored prodecure is getting
pulled into the Date parameter...that would explain why the error message
indicateds an INT value is being passed to the DT field?
TABLE
---------
CREATE TABLE [dbo].[StatusRequest] (
[StatusRequestID] [int] IDENTITY (1, 1) NOT NULL ,
[BoatID] [int] NULL ,
[StatusID] [int] NULL ,
[CompID] [int] NULL ,
[DeptID] [int] NULL ,
[CatID] [int] NULL ,
[ConID] [int] NULL ,
[CurrID] [int] NULL ,
[ListingTypeID] [int] NULL ,
[BrokerTypeID] [int] NULL ,
[BrokerID] [int] NULL ,
[BrokerOutside] [varchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Price] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[CreateDate] [datetime] NULL ,
[EmailBuyer] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[EmailSeller] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[EmailAuthor] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[URL1] [varchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[URL2] [varchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[URL3] [varchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[URL4] [varchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[FTP1] [varchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[FTP2] [varchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[FTP3] [varchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[FTP4] [varchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Marina] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[StateID] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[CountryID] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[RealmAccessID] [int] NULL ,
[Comments] [varchar] (3000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[CommListing] [int] NULL ,
[CommSelling] [int] NULL ,
[StatReqBLN] [int] NULL ,
[DateAvailability] [datetime] NULL ,
[DateDelivery] [datetime] NULL ,
[Document1] [varchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Document2] [varchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
STORED PROCEDURE
---------------------------
CREATE Procedure spr_AddStatusRequest
@BoatID int,
@StatusID int,
@CompID int,
@DeptID int,
@CatID int,
@ConID int,
@BrokerTypeID int,
@BrokerID int,
@CurrID int,
@Price varchar (20),
@CreateDate datetime,
@EmailBuyer varchar (100),
@EmailSeller varchar (100),
@EmailAuthor varchar (100),
@URL1 varchar (150),
@URL2 varchar (150),
@URL3 varchar (150),
@URL4 varchar (150),
@FTP1 varchar (150),
@FTP2 varchar (150),
@FTP3 varchar (150),
@FTP4 varchar (150),
@Marina varchar (100),
@StateID varchar (100),
@CountryID varchar (100),
@Comments varchar (3000),
@CommListing int,
@CommSelling int,
@StatReqBLN int,
@ListingTypeID int,
@BrokerOutside varchar (150),
@RealmAccessID int ,
@DateAvailability datetime,
@DateDelivery datetime,
@Document1 varchar (150) ,
@Document2 varchar (150)
BB SP GENERATOR:
Dim cmd, param
Set cmd=server.CreateObject("ADODB.Command")
With cmd
.CommandType=adcmdstoredproc
.CommandText = "spr_AddStatusRequest"
set .ActiveConnection=cnSQL
set param = .createparameter("@RETURN_VALUE", adInteger,
adParamReturnValue, 0)
.parameters.append param
set param = .createparameter("@BoatID", adInteger, adParamInput, 0, [put
value here])
.parameters.append param
set param = .createparameter("@StatusID", adInteger, adParamInput, 0, [put
value here])
.parameters.append param
set param = .createparameter("@CompID", adInteger, adParamInput, 0, [put
value here])
.parameters.append param
set param = .createparameter("@DeptID", adInteger, adParamInput, 0, [put
value here])
.parameters.append param
set param = .createparameter("@CatID", adInteger, adParamInput, 0, [put
value here])
.parameters.append param
set param = .createparameter("@ConID", adInteger, adParamInput, 0, [put
value here])
.parameters.append param
set param = .createparameter("@BrokerTypeID", adInteger, adParamInput, 0,
[put value here])
.parameters.append param
set param = .createparameter("@BrokerID", adInteger, adParamInput, 0, [put
value here])
.parameters.append param
set param = .createparameter("@CurrID", adInteger, adParamInput, 0, [put
value here])
.parameters.append param
set param = .createparameter("@Price", adVarChar, adParamInput, 20, [put
value here])
.parameters.append param
set param = .createparameter("@CreateDate", adDBTimeStamp, adParamInput,
0, [put value here])
.parameters.append param
set param = .createparameter("@EmailBuyer", adVarChar, adParamInput, 100,
[put value here])
.parameters.append param
set param = .createparameter("@EmailSeller", adVarChar, adParamInput, 100,
[put value here])
.parameters.append param
set param = .createparameter("@EmailAuthor", adVarChar, adParamInput, 100,
[put value here])
.parameters.append param
set param = .createparameter("@URL1", adVarChar, adParamInput, 150, [put
value here])
.parameters.append param
set param = .createparameter("@URL2", adVarChar, adParamInput, 150, [put
value here])
.parameters.append param
set param = .createparameter("@URL3", adVarChar, adParamInput, 150, [put
value here])
.parameters.append param
set param = .createparameter("@URL4", adVarChar, adParamInput, 150, [put
value here])
.parameters.append param
set param = .createparameter("@FTP1", adVarChar, adParamInput, 150, [put
value here])
.parameters.append param
set param = .createparameter("@FTP2", adVarChar, adParamInput, 150, [put
value here])
.parameters.append param
set param = .createparameter("@FTP3", adVarChar, adParamInput, 150, [put
value here])
.parameters.append param
set param = .createparameter("@FTP4", adVarChar, adParamInput, 150, [put
value here])
.parameters.append param
set param = .createparameter("@Marina", adVarChar, adParamInput, 100, [put
value here])
.parameters.append param
set param = .createparameter("@StateID", adVarChar, adParamInput, 100,
[put value here])
.parameters.append param
set param = .createparameter("@CountryID", adVarChar, adParamInput, 100,
[put value here])
.parameters.append param
set param = .createparameter("@Comments", adVarChar, adParamInput, 3000,
[put value here])
.parameters.append param
set param = .createparameter("@CommListing", adInteger, adParamInput, 0,
[put value here])
.parameters.append param
set param = .createparameter("@CommSelling", adInteger, adParamInput, 0,
[put value here])
.parameters.append param
set param = .createparameter("@StatReqBLN", adInteger, adParamInput, 0,
[put value here])
.parameters.append param
set param = .createparameter("@ListingTypeID", adInteger, adParamInput, 0,
[put value here])
.parameters.append param
set param = .createparameter("@BrokerOutside", adVarChar, adParamInput,
150, [put value here])
.parameters.append param
set param = .createparameter("@RealmAccessID", adInteger, adParamInput, 0,
[put value here])
.parameters.append param
set param = .createparameter("@DateAvailability", adDBTimeStamp,
adParamInput, 0, [put value here])
.parameters.append param
set param = .createparameter("@DateDelivery", adDBTimeStamp, adParamInput,
0, [put value here])
.parameters.append param
set param = .createparameter("@Document1", adVarChar, adParamInput, 150,
[put value here])
.parameters.append param
set param = .createparameter("@Document2", adVarChar, adParamInput, 150,
[put value here])
.parameters.append param
.execute ,,adexecutenorecords
end with