Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 24th, 2004, 03:28 AM
Authorized User
 
Join Date: Jul 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to AFei
Default storage PROCEDURE arguments question?

in asp code

cmd.parameters.append cmd.createparameter("@MsgContent",200,1,400)
200:varchar type
1:input
400: length

yes or no?

I want use a argument which it is a datetime type. what can i do?



 
Old September 24th, 2004, 03:34 AM
Friend of Wrox
 
Join Date: Sep 2004
Posts: 104
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to sureshbabu Send a message via Yahoo to sureshbabu
Default

Hi,
    here I am giving syntax..
  .Parameters.Append cmd.CreateParameter("EndDate",adDate, adParamInput, 8, "10/10/2004")


Here
EndDate : varaiable name that is there in tha database.
adDate: Type
adParamInput: input type
8 is the size
"10/10/2004" is the value.
similarly

.Parameters.Append cmd.CreateParameter("ID", adInteger, adParamInput, 4 ,1000)





Thanks
Suresh




 
Old September 24th, 2004, 03:48 AM
Authorized User
 
Join Date: Jul 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to AFei
Default

if cmd.CreateParameter's option express with numeric
such as
cmd.CreateParmater("@sendTime",4,1,8) ???


 
Old September 24th, 2004, 04:30 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

Here are the values of all possible data types:

Const adEmpty = 0
Const adTinyInt = 16
Const adSmallInt = 2
Const adInteger = 3
Const adBigInt = 20
Const adUnsignedTinyInt = 17
Const adUnsignedSmallInt = 18
Const adUnsignedInt = 19
Const adUnsignedBigInt = 21
Const adSingle = 4
Const adDouble = 5
Const adCurrency = 6
Const adDecimal = 14
Const adNumeric = 131
Const adBoolean = 11
Const adError = 10
Const adUserDefined = 132
Const adVariant = 12
Const adIDispatch = 9
Const adIUnknown = 13
Const adGUID = 72
Const adDate = 7
Const adDBDate = 133
Const adDBTime = 134
Const adDBTimeStamp = 135
Const adBSTR = 8
Const adChar = 129
Const adVarChar = 200
Const adLongVarChar = 201
Const adWChar = 130
Const adVarWChar = 202
Const adLongVarWChar = 203
Const adBinary = 128
Const adVarBinary = 204
Const adLongVarBinary = 205

and here are the values for parameter direction:
Const adParamUnknown = 0
Const adParamInput = 1
Const adParamOutput = 2
Const adParamInputOutput = 3
Const adParamReturnValue = 4

leave out the size when adding date and int parameters

hth
Phil
 
Old September 24th, 2004, 04:35 AM
Authorized User
 
Join Date: Jul 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to AFei
Default

thanks *_*






Similar Threads
Thread Thread Starter Forum Replies Last Post
Procedure or function has too many arguments Raby VB Databases Basics 6 November 16th, 2007 11:38 AM
Max Arguments Sent to Stored Procedure? saturdave ASP.NET 1.0 and 1.1 Basics 3 June 15th, 2006 10:15 AM
question on automating a procedure boksi VB.NET 2002/2003 Basics 6 February 15th, 2005 06:11 PM
Stored procedure question gbrown SQL Server 2000 3 November 26th, 2004 03:58 PM
Store Procedure IF Else Newbie Question harpua SQL Server ASP 1 November 1st, 2004 08:31 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.