473,320 Members | 1,945 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Problems using COMPRESS() in a statement (using Ole DB components)

I am developping with Visual Studio 2003 + C# + MySQL 4.1 and the OleDb
components. My problem is that a stament using the COMPRESS() function seems
to work or not depending on the data ...

Here is the code:

OleDbCommand catCMD = DatabaseConnection.CreateCommand();
catCMD.CommandText = "INSERT INTO MyTable (id,msg) VALUES (88,COMPRESS(?));"
OleDbParameter p = catCMD.CreateParameter();
p.ParameterName = "msg";
p.OleDbType = OleDbType.VarChar;
p.Value = MyRawHTML; // string containing the text on a web page
catCMD.Parameters.Add(p);
catCMD.ExecuteNonQuery();

the 'msg' column is defined as 'BLOB';
This will generate an exception or not depending on the contents of
myRawHTML ... the error is E_ERRORSINCOMMAND

Who or what even looks at the input string and why should its contents be
considered an error in the command's syntax??? Should I be using another
type than VarChar?

This is very annoying - so now I changed my code to catch the exception and,
if so, store everything but the message data - which happens in about 1/3 of
the cases for what I am processing ...

By the way: I am using an Ole DB provider for MySQL which I found on
www.MySQL.com, but it was written in 2001 and I am wondering if it could be
the source of my many problems. Any OLE DB MySQL developer out there who can
help make a recommendation?

Thanks,
Patrick
Jul 20 '05 #1
0 1500

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Tony | last post by:
Hello, Any assistance would be appreciated: As the subject suggests I am trying to gunzip files using the Compress::Zlib module. The following is basically the code that I am working with: ...
10
by: Xah Lee | last post by:
today i need to use Python to decompress gzip files. since i'm familiar with Python doc and have 10 years of computing experience with 4 years in unix admin and perl, i have quickly located the...
47
by: Bonj | last post by:
I downloaded the gzlib library from zlib in order to do compression. (http://www.gzip.org/zlib) The prototype of the compression function seems to be int compress (Bytef *dest, uLongf *destLen,...
1
by: hledman | last post by:
Hello, Beginner here reading through murach's c# book and come to a point where the book doesn't give a good example of what they want you to do in the exercise. I've created an array with 5...
3
by: l-touched | last post by:
Hi! I am developing with ASP.NET (VB.NET), I have my web server hosting my aspx pages, in another server I have my COM+ components, I have exported my Application Proxy from that component, I...
4
by: john | last post by:
I'm having some Interop problems. I really need someone's help on this, i'm running out of ideas. I have upgraded my Data access controls to the latest ver. Now then i have a form with these...
1
by: denis | last post by:
hello I'm using a dll made in c++ in a delphi app, but get some errors I've use stdcall for the parameters match. I need someone have use C dll in delphi tell me if there is missing something....
6
by: comp.text.xml | last post by:
Hi, I'm developing a system uses SOAP took kit version 3. The XML is transferred between the server and the client. We have noticed when transferring data using SOAP a considerable amount of...
5
by: zgh1970 | last post by:
Hi, Friends, default DB2 compression library. I am wondering if this option will have any new restriction on RESTORE in the following. (Can I used that backup imsage for restore at the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.