Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Friday, November 22, 2024 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Architect Forums - ADO General
Forum to discuss ADO specific questions for use with SalesLogix. View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to ADO General | New ThreadView:  Search:  
 Author  Thread: SLX Field Types
Derek Williams
Posts: 5
 
SLX Field TypesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 05 Sep 06 3:53 PM
fiogf49gjkf0d
Does anyone know how to obtain the field types and lengths when I build a recordset from an SQL?

I need to compare the field type, string, integer, float... to fields in an external database. I could hard code all the field types, but it would be much better if I could find out what kind of fields are in the SQL.

Seems that there should be something like RSFields.fields(i).type or RSFields.fields(i).length.

I'm not always good at explaining things so I hope this is clear enough.

Thanks

Derek Williams
[Reply][Quote]
Stuart
Posts: 178
 
Re: SLX Field TypesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 Sep 06 2:29 AM
fiogf49gjkf0d
I have not tried this, but assuming the SLX recordsets behave 'normally' you should be able to do something like:

Select Case objRecordset.Fields.Item(X).Type
Case 5
' number
Case 7
' datetime
Case 202
' string
Case Else
' something else
End Select


This gives the type values: http://www.w3schools.com/ado/prop_type.asp

[Reply][Quote]
Derek Williams
Posts: 5
 
Re: SLX Field TypesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 12 Sep 06 2:13 PM
fiogf49gjkf0d
Thanks Stuart,

This works OK. One problem though is how to find out the field length of an empty string field.

Since I'm only using the Account table right now, I'll just enter the values in the code.

Is your picture of a man having trouble with his umbrella?
[Reply][Quote]
Stuart
Posts: 178
 
Re: SLX Field TypesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 13 Sep 06 2:16 AM
fiogf49gjkf0d
Quote:
Originally posted by Derek Williams


This works OK. One problem though is how to find out the field length of an empty string field.
Since I'm only using the Account table right now, I'll just enter the values in the code.

I didn't need the lengths, and I can't see how you would get them.
Quote:

Is your picture of a man having trouble with his umbrella?

It's a road sign meaning road works ahead, which had blown onto its side, which I found amusing. We do refer to the sign as 'men with opening umbrellas ahead' though. Original picture is here: http://www.flickr.com/photos/stuartajc/180552709/




[Reply][Quote]
Derek Williams
Posts: 5
 
Re: SLX Field TypesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 13 Sep 06 1:46 PM
fiogf49gjkf0d
You're a limey! Thought as much. Is SLX popular in the UK?

Just browsed most of your photos. Can I email you so as not to use this forum inappropriately?

derekberek@verizon.net
[Reply][Quote]
Stuart
Posts: 178
 
Re: SLX Field TypesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 14 Sep 06 2:35 AM
fiogf49gjkf0d
There are quite a few SLX users over here, not sure how many though.

I have emailed you about Flickr...
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: SLX Field TypesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 14 Sep 06 3:00 PM
fiogf49gjkf0d
To get the fields size there are two properties on the field object.

DefinedSize will display the defined field size in the database, or the size that the field's values can be. This is likely the one you are after.

ActualSize will display the actual size (length in bytes) that the field's value actually is.

-Ryan

[Reply][Quote]
Stuart
Posts: 178
 
Re: SLX Field TypesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 15 Sep 06 2:54 AM
fiogf49gjkf0d
Thanks Ryan, that is really useful
[Reply][Quote]
Derek Williams
Posts: 5
 
Re: SLX Field TypesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 21 Sep 06 6:54 PM
fiogf49gjkf0d
Where do i find a list of all the recordset-object properties and methods?

I have been using the object browser in VB6, but the properties and methods do not look correct for SLX.

Is intellisense in SLX meant to work for ADO objects?

Thanks

Derek
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: SLX Field TypesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 21 Sep 06 9:01 PM
fiogf49gjkf0d
SLX Intellisense will not work for ADO objects.

For a good reference (and one you really cannot do without IMO), see here: ADO 2.6 Reference Guide
[Reply][Quote]
Derek Williams
Posts: 5
 
Re: SLX Field TypesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 21 Sep 06 9:23 PM
fiogf49gjkf0d
Thanks Ryan. I just ordered the book from Amazon.
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2024 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 11/22/2024 4:03:06 PM