Text Area Mapping

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi Everyone!

I am have a real problem mapping a "Text Area" object to a SQL databse
table.....

I am wanting to us this form object to allow users a area for free text upto
255 characters i.e. to make notes, but FP keeps saying that the field on the
form does not match the column in the SQL database.

I have change the data type in my SQL to variou other but get the same
message! In access I can use the memo field but there is not memo field for
SQL.

Can anyone help on what data type I should be setting the SQL column to to
be able to use the "Text Area" otherwise I am stuck the a text field which
isn't very practical.

Tia


Jonathan
 
Hi,
The equivalant in SQL Server is varchar which has a limit of 8000
characters. You need to set the length of the field in sql server - the
default is 50, so you'd want to set it to 255. There's also a text field in
sql server for data >8000 characters - if you can't get anywhere using a
varchar try text.
 
Hi Jon,

Thank for your reply, I tried changing the SQL field to varchar but FP still
doesn't like it which I think is bizaar. If I change from a "text area" to a
"text box" it's fine I can change the SQL column to practically any data type
with a text box on my FP form it's just when I try to use a "text area"
control.

I'll try again

Cheers
 
Hi,
Have you tried setting the datatype in SQL Server to text? Using FP logic I
bet it would work - even though technically it would be wrong, there's lots
of reasons not to use a text datatype in sql server unless you really have
to. Having said that though the FP wizards are really designed for people
who have no knowledge of databases and just want to get a page working -
such people would probably not be using sql server in the first place.

To be honest I'd take this incident as a sign you should be leaving the FP
wizard behind and rolling your own code. You could stick the contents of a
text box into a sql server varchar field with 3 lines of code :-)
 
Hi Jon

Eureka I have done it!!!!!

Heres what I did

1. I changed the SQL column to datatype nvarchar and set the form field to a
text box, mapped the drives in FP so FP now links a text box to a column in
SQL with a datatype nvarchar.

2. Opened the FP form again in edit mode, click once on the text field
(called "notes") then clicked on the "text area" icon on the tool bar at the
text box changed automatically to a "text area" box.

3. I double clicked the new text area box to get to the properties and
changed the name from "S1" to "notes" then saved the page without re-mapping
the fields.

Hey presto the field put the data in SQL and FP is none the wiser!

Thanks though I appreciated your pointers

Jonathan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top