> Hi All!
> I am a newbie at mySQL. I need to implement a database which has the
> capability to store some *.dat files. hence i have already implemented
> a table using:
>
> create table table_name (field_name1 int unsigned auto_increment
> primary key not null, data_file longblob not null);
>
> I then tried to input file into the data_file field using the load_file
> function using:
>
> insert into table_name(field_name1,data_file) values
> (1,'/absolute/path/file_name.jpg'));
>
> but it kept giving me an error that data_file does not allow NULL
> values. Hence, after some trouble shooting, I figured out that the
> load_file function was returning a NULL.
>
> I have checked out the parameter 'max_allowed_packet' and other
> messages but to no avail.


Venu,

Welcome to the community...

The load file contains two fields - including a field_name1 value, yet the CREATE 
TABLE asks MySQL to
AUTO_INCREMENT the field.

Regards,
=dn



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to