Adoserver:SetDataField()

<< Click to Display Table of Contents >>

Navigation:  Dataservers > AdoServer Class >

Adoserver:SetDataField()

Previous pageReturn to chapter overviewNext page

Purpose

Change the automatically assigned DataField for a specific column

 

Prototype

METHOD SetDataField( nFieldPosition, oDataField ) CLASS AdoServer

 

 

Argument(s)

nFieldPos        Column number for which to assign a new DataField

oDataField        DataField Object

 

Return

LOGIC        Ok if succeeded, else FALSE

 

Description

With this method you can assign a new DataField to a column, for example if you want to override the number of decimals that the server has automatically 'deduced' from the Ado Field type

The method checks to see if the old datatype matches the new datatype (Character and Memo are treated as the same)

 

NoteWe added this method because the default method in the Dataserver would not allow to change the width or decimals for numeric column, not would allow to change a Character field to Memo or vice versa

 

 

See Also

Adoserver, AdoRecordSet, AdoServer:RecordSet