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.


 Subscribe in a reader

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

Notices




Closed Thread
 
LinkBack Thread Tools
  #1  
Old Sep 14th, 2004, 17:09
spinal007's Avatar
Moderator
Join Date: Mar 2004
Location: Good Ol'London
Age: 23
Posts: 1,669
Blog Entries: 1
Thanks: 1
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)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!

  #2  
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #3  
Old Sep 14th, 2004, 17:47
spinal007's Avatar
Moderator
Join Date: Mar 2004
Location: Good Ol'London
Age: 23
Posts: 1,669
Blog Entries: 1
Thanks: 1
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)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #4  
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #5  
Old Sep 15th, 2004, 11:41
Rob's Avatar
Rob Rob is offline
Webforumz Founder
Join Date: Jul 2003
Location: Southern UK
Age: 34
Posts: 3,192
Blog Entries: 7
Thanks: 27
Thanked 23 Times in 20 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.
__________________
Click the 'Thanks!' button if this post has helped you

Rob - Webforumz Founder
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #6  
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....
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #7  
Old Sep 19th, 2004, 07:39
spinal007's Avatar
Moderator
Join Date: Mar 2004
Location: Good Ol'London
Age: 23
Posts: 1,669
Blog Entries: 1
Thanks: 1
Thanked 4 Times in 4 Posts
thanks guys
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
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 23:35.


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