Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SQL Statement too long using FoxOleDB

10 views
Skip to first unread message

Mike Pisano

unread,
Jan 12, 2003, 9:40:21 PM1/12/03
to
Hello All,

I am using the FoxPro OleDB driver through ADO.NET and getting a "SQL
Statement too long" error.

If I Update one column, The Command Builder builds a SQL statement with all
the columns which I presume is too long for the driver to handle given the
error. Is their a way to either expand the SQL Buffer beyond the 2048
default, or have command Builder only include the columns necessary for the
update? I presume if a Insert a record I will also hit this limitation, Is
their a way to break up the command or some other means of updating the
tables.

Thanks in Advance,
Mike Pisano


Bob Grommes

unread,
Jan 12, 2003, 11:25:20 PM1/12/03
to
You are probably going to have to build your own command string and
Parameters collection. Not a big deal really. The CommandBuilder isn't
very flexible or smart, and even if it happens to work you can, in a given
situation, usually write a more efficient UPDATE statement by hand.

--Bob

"Mike Pisano" <Mpi...@ConcordiaFreight.com> wrote in message
news:e1sEqzquCHA.456@TK2MSFTNGP09...

garygumsft

unread,
Jan 13, 2003, 2:38:28 AM1/13/03
to

Hi Mike,

As an alternative, you can create your own UpdateCommand, insetad of using
the CommandBuilder to generate an UpdateCommand automatically.

For more information and sample code, please refer to the documentation at
http://msdn.microsoft.com/library/en-us/cpguide/html/cpconupdatingdatabasewi
thdataadapterdataset.asp?frame=true

Gary

This posting is provided "AS IS", with no warranties, and confers no
rights. Enjoyed ASP.NET? http://www.asp.net

Mike Pisano

unread,
Jan 13, 2003, 10:55:03 AM1/13/03
to
Thanks Bob & Gary,

I was afraid of that, What a Dumb limitation.

What happens when you need to update a field that is larger then 2k as in a
Memo field?

Thanks Again,
Mike


garygumsft

unread,
Jan 14, 2003, 8:31:36 PM1/14/03
to
Hi Mike,

It seems to a limitation of the FoxPro OLEDB provider. I am doing some
further research on it and will post back later.

I appreciate for your great patience.

Best Regards,

garygumsft

unread,
Jan 17, 2003, 1:16:40 AM1/17/03
to
Hi Mike,

I am working with the appropriate team on this case. I will post here back
if there is any update.

Thanks for your great patience.

0 new messages