473,770 Members | 1,644 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

MyODBC recognize all BLOB fields as FIELD_TYPE_BLOB ?

qhe
Dear All:

I'm using MyODBC 3.51.06 and MySQL 4.0.18.

My table has a mediumblob field, but I can't update/insert data larger than
64K. The test application is created by VC6 appwizard, here is the test
code:

m_pSet->GetODBCFieldIn fo(2, fieldinfo);
n = fieldinfo.m_nPr ecision;

No matter field is blob, mediumblob or longblob, the m_nPrecision is always
65535. I traced into the myodbc source, in this piece of code (utility.c):
////////////////////////////////////////////////////////////////////////////
int unireg_to_sql_d atatype(STMT FAR *stmt, MYSQL_FIELD *field, char *buff,
ulong *transfer_lengt h, ulong *precision,
ulong *display_size)
{
char *pos;
if (stmt->dbc->flag & (FLAG_FIELD_LEN GTH | FLAG_SAFE))
*transfer_lengt h= *precision= *display_size= max(field->length,
field->max_length);
else
*transfer_lengt h= *precision= *display_size= field->max_length;

switch(field->type) {

...

case FIELD_TYPE_BLOB :
if (buff)
strmov(buff,(fi eld->flags & BINARY_FLAG) ? "blob" : "text");
if (stmt->dbc->flag & (FLAG_FIELD_LEN GTH | FLAG_SAFE))
*transfer_lengt h= *precision= *display_size= 65535;

////////////////////////////////////////////////////////////////////////////
the field->type is FIELD_TYPE_BLOB for blob,mediumblob and longblob.
This leads to an buffer length error, I can't feed longer data into the
field, and sometimes there gives memory alloction error.

Is this a MyODBC bug?

TIA

qhe
Jul 19 '05 #1
0 1528

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

Similar topics

3
3146
by: NotGiven | last post by:
I am researching the best place to put pictures. I have heard form both sides and I'd like to know why one is better than the other. Many thanks!
0
986
by: David McKay | last post by:
I have an VB frontend that can't be changed for various reasons, and have been attempting to move the database (access) out to MySQL (for various other reasons ;). I haven't been able to successfully read True/False fields, and after much research it appears that I need to map any true/false or yes/no to 1/0 in the MyODBC source code. I've downloaded the source code, but I haven't been able to determine what and how to change the...
3
4726
by: hamvil79 | last post by:
I'm implementig a java web application using MySQL as database. The main function of the application is basically to redistribuite documents. Those documents (PDF, DOC with an average size around 2Mb) are stored in BLOB column. The amount of documents for the first year should not exceed 5/6 Giga, but I cannot make prevision for the next years. Those documents are mainly just accessed (update and delete are not so
0
2330
by: HABJAN ®iga | last post by:
I'am trying to insert a record with a blob field in it: create table KC113DELO.Test1( ID INT NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1, NO CACHE ), TTEST VARCHAR(30), TBLOB BLOB(50000) NOT LOGGED NOT COMPACT ) DATA CAPTURE NONE IN USERSPACE1
7
5138
by: johnm | last post by:
We have a new CRM application that uses a DB2 7.2 database. Our users noted that the CRM application would not allow them to attach and store any documents over 2 meg in size. When asked, the vendor claims that this behavior is a limit of the DB2 system. We asked the vendor how we might get around this issue since most of our user's documents are over the 2 meg limit. The vendor said that by removing logging from the blob fields the 2...
0
1155
by: LuisH | last post by:
Hi, I'm very new on this group. I don't know if this is a old point here. My question is: What is the best way to access Blob rows using C/C++ on PostgreSQL ????? 1) Using ODBC and using SELECT I can use SQLGetData to receive many parts of each Blob.
2
9001
by: pmz | last post by:
Dear Group, I'm connecting in C# with remote (BSD) MySQL server with ODBC Driver, and I'm trying to find the best sollution in such problem: As I've read on MySQL manual, they have suggested table design including the BLOB-Fieldtype size in UInt64, where they've stored, while inserting, the size of inserted BLOB data. But in the matter of fact, I'm interested if it's necessary to include in table this integer field? Is there any way...
0
5073
by: Big George | last post by:
I'm developing with ASP.NET, VS.NET 2003. Using Crystal Report for VS.NET DataBase: Oracle 10g I store a BLOB field in a table. This field store images, like jpg files. The Stored Procedure that I use to fill the report is: OPEN MyCursor FOR
0
1903
by: coony | last post by:
Hi everyone, I got an annoying thing going on. I've got an MSSQL db which is filled with different data, used by another program (T-Plan). I should read some table to import in another DB. The DB I have to read, contains als BLOB files. In Excel I created a connection string, can read all fields & values as shown in the DB, but I can't manage to convert the Blobs to Strings (which is the data in the BLOBs). I tried all the next, but...
0
9595
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10232
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10059
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10008
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9873
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6682
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5313
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3578
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2822
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.