recordset constants (data types)

This is a discussion on "recordset constants (data types)" within the Classic ASP section. This forum, and the thread "recordset constants (data types) are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > Classic ASP

Notices


Closed Thread
 
LinkBack Thread Tools
  #1 (permalink)  
Old Sep 14th, 2004, 17:09
spinal007's Avatar
Moderator
Join Date: Mar 2004
Location: Good Ol'London
Age: 23
Posts: 1,649
Blog Entries: 1
Thanks: 0
Thanked 4 Times in 4 Posts
recordset constants (data types)

I need to create a recordset (through scripting, not connecting to a database)

I know that for text fields (variants) I can use the constant 200,
integers is 3 and dates is 7

I've looked all over the place and I can't find anything on this.....
anyone know what the other constants are?
boolean/memo/etc

sample code:
Code: Select all
' contants
cnstVar = 200
cnstInt = 3
cnstDate = 7

' define recordset and fields
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Fields.Append "name", cnstVar, 100 ' variant, length 100
rs.Fields.Append "number", cnstInt ' integer
rs.Fields.Append "date", cnstDate ' date
rs.Open

' then add data to the recordset like this.......
rs.AddNew
rs("name") = "hello world!"
rs("number") = 157
rs("date") = Now()
rs.Update

' ETC
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)

  #2 (permalink)  
Old Sep 14th, 2004, 17:36
Most Reputable Member
Join Date: Jul 2003
Posts: 1,856
Thanks: 0
Thanked 0 Times in 0 Posts
Here you go:
http://msdn.microsoft.com/library/de...tatypeenum.asp
  #3 (permalink)  
Old Sep 14th, 2004, 17:47
spinal007's Avatar
Moderator
Join Date: Mar 2004
Location: Good Ol'London
Age: 23
Posts: 1,649
Blog Entries: 1
Thanks: 0
Thanked 4 Times in 4 Posts
I searched the MSDN website and still couldn't find it... I must be thick.......
thanks a million!
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)
  #4 (permalink)  
Old Sep 15th, 2004, 06:55
Most Reputable Member
Join Date: Jul 2003
Posts: 1,856
Thanks: 0
Thanked 0 Times in 0 Posts
Yeah, the problem with MSDN is you have to already know where something is to find it.
  #5 (permalink)  
Old Sep 15th, 2004, 11:41
Rob's Avatar
Rob Rob is offline
Head Admin & CEO

SuperMember
Join Date: Jul 2003
Location: at my desk
Age: 34
Posts: 2,953
Blog Entries: 7
Thanks: 7
Thanked 4 Times in 4 Posts
Well, not quite true.
I always use google to search MSDN, as I find it better than msdn's own search.

To search MSDN (on google) for this, you would use:- 'ADO Data types site:msdn.microsoft.com'
The 'site:msdn.microsoft.com' switch tells google to ONLY return results from that domain, as can be seen by clicking here:-
http://www.google.com/search?hl=en&l....microsoft.com

I believe the result you want, is listed second.
__________________
Rob - SEO Specialist
Owner & Founder of Webforumz.com

I am currently unavailable for private work
  #6 (permalink)  
Old Sep 16th, 2004, 07:51
Highly Reputable Member
Join Date: Jul 2003
Location: Ipswich, UK
Posts: 690
Thanks: 0
Thanked 0 Times in 0 Posts
magic numbers....
  #7 (permalink)  
Old Sep 19th, 2004, 07:39
spinal007's Avatar
Moderator
Join Date: Mar 2004
Location: Good Ol'London
Age: 23
Posts: 1,649
Blog Entries: 1
Thanks: 0
Thanked 4 Times in 4 Posts
thanks guys
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)
Closed Thread

Tags
recordset, constants, data, types

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Importing RecordSet to .asp file tolis Classic ASP 8 Nov 23rd, 2005 20:23
MIME types ktsirig PHP Forum 0 Oct 10th, 2005 17:38
passing recordset to next page? Monie Classic ASP 1 Sep 25th, 2004 07:53
Constants jakyra Classic ASP 2 Oct 16th, 2003 12:27


All times are GMT. The time now is 07:20.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43