Josh,
I've tried to reproduce the problem, but I haven't had any luck. With a
textbox (multi-line or not) bound to an Access memo column, I have no
problem persisting an empty string to the database. Which versions of the
following are you using?
1. Access (i.e.: the version of Access for which your database was created)
2. MDAC/ADO
3. .NET framework
And lastly, what's the connection string you're using to connect to the
database?
Nicole
I've changed the textbox's multline property to false and it still doesn't
work... I presume the problem is from the database.
In changing the Field's Type to text it works, however if it is memo it
doesn't :S
Josh
Actually, Ignore my last post, it's still crashing ....
Here's how the adapter is set up:
SqlStr = "SELECT * FROM Persons WHERE PersonId = 1"
myCon = New OleDb.OleDbConnection(g.DBStr)
myAdapter = New OleDb.OleDbDataAdapter(SqlStr, myCon)
myAdapter.Fill(myDS, myDataTable)
Dim myBuilder As New OleDb.OleDbCommandBuilder(myAdapter)
myAdapter.UpdateCommand = myBuilder.GetUpdateCommand
myAdapter.InsertCommand = myBuilder.GetInsertCommand
myAdapter.DeleteCommand = myBuilder.GetDeleteCommand
myCon.Close()
It allows me to save if the text field has data, however, if its empty
the
following error is raised:
An unhandled exception of type 'System.InvalidOperationException'
occurred
in system.data.dll
It is raised on the line:
myAdapter.Update(myDS, "Persons")
Josh
Sorry, late Friday brain scramble... What's the update command on
your
dataadapter? What exception do you see when the update fails?
AllowZeroLength = True means that zero length strings are allowed...
Josh
Josh,
I'm not sure from your answer if you understand the implications
of
this
so,
just in case... AllowZeroLength = true means that a zero-length
string
cannot be used as a value in the column. This is pretty