Paradox likes field names containing spaces to be enclosed in - hmmm,
memory fails - try square brackets or double quotes....
Loay Habash wrote:
>Hello Every body:
>
>Do you like hard questions ????
>See this one,.....
>
>If you put space at the fieldname you will get the "Preparation of field
>default faild" error ???
>if you name it as one word you will get no error.
>If you did not use DefaultExpression for the field or RequestLive for the
>query you will get no error what ever the field name is,..... Can I get any
>Help.
>
>Var
> MyQuery : TQuery;
> MyTable :TTable;
>begin
> MyTable := Ttable.Create(Form1);
> With MyTable Do
> begin
> TableName := 'c:\Table1.db';
> TableType := ttParadox;
> FieldDefs.Add('Emp Name', ftString, 20, False);
> CreateTable;
> free;
> end;
> MyQuery := TQuery.Create(Form1);
> With MyQuery Do
> Begin
> close;
> RequestLive := True;
> SQL.Clear;
> Sql.Text := 'Select * from ''c:\Table1.db''';
> End;
> DataSource1.DataSet := MyQuery;
> With TStringField.Create(Application) Do
> Begin
> FieldName := 'Emp Name';
> Size := 20;
> DataSet := MyQuery;
> DefaultExpression :='''Name''';
> end;
> MyQuery.open;
>end;
>
>
>
>Loay Habash,
>http://groups.yahoo.com/group/WeLoveYouAll/
>http://profiles.yahoo.com/leohabash
>[EMAIL PROTECTED]
>Mobile: +966503322315
>
>
>---------------------------------
> Start your day with Yahoo! - make it your home page
>
>[Non-text portions of this message have been removed]
>
>
>
>
>-----------------------------------------------------
>Home page: http://groups.yahoo.com/group/delphi-en/
>To unsubscribe: [EMAIL PROTECTED]
>Yahoo! Groups Links
>
>
>
>
>
>
>
>
>
>
------------------------ Yahoo! Groups Sponsor --------------------~-->
Most low income households are not online. Help bridge the digital divide today!
http://us.click.yahoo.com/cd_AJB/QnQLAA/TtwFAA/i7folB/TM
--------------------------------------------------------------------~->
-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED]
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/delphi-en/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/