Re: [WebDNA] Upload file to mysql

This WebDNA talk-list message is from

2017


It keeps the original formatting.
numero = 113483
interpreted = N
texte = 1078 --Apple-Mail=_18BB7290-E5DF-4A8F-A9F1-BCEEB155A749 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 I think that is where your problem lies. https://dev.mysql.com/doc/refman/5.7/en/string-literals.html The MySQL manual page for strings says: \0 An ASCII NUL (0x00) character. \' A single quote (=E2=80=9C'=E2=80=9D) character. \" A double quote (=E2=80=9C"=E2=80=9D) character. \b A backspace character. \n A newline (linefeed) character. \r A carriage return character. \t A tab character. \Z ASCII 26 (Control-Z).=20 \\ A backslash (=E2=80=9C\=E2=80=9D) character. \% A =E2=80=9C%=E2=80=9D character.=20 \_ A =E2=80=9C_=E2=80=9D character.=20 Kind regards Stuart Tremain Pharoah Lane Software AUSTRALIA webdna@idfk.com.au > On 21 Mar 2017, at 13:42, = wrote: >=20 > I added the ; into my convertchars database. Flushed=E2=80=A6 still = having an issue. > I think I need a bigger list of escape characters L > =20 > =20 > =20 > From: Stuart Tremain [mailto:webdna@idfk.com.au = ]=20 > Sent: Monday, March 20, 2017 9:45 PM > To: WebDNA Talk List > > Subject: Re: [WebDNA] Upload file to mysql > =20 > That is a problem with a character causing MySQL to fail. > =20 > Looking at your conversion db it looks like you have covered = everything except for ; (semicolon) > =20 > There may be something else as well. > =20 > Kind regards > =20 > Stuart Tremain > Pharoah Lane Software > AUSTRALIA > webdna@idfk.com.au > =20 > =20 > =20 > =20 >=20 > =20 >> On 21 Mar 2017, at 12:16, > > wrote: >> =20 >> ERROR TEXT: You have an error in your SQL syntax; check the manual = that corresponds to your MySQL server version for the right syntax to = use near ''\%PDF-1.5 \%=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD 1 0 obj < >> =20 >> =20 >> When I look in the errorlog.txt file, the =EF=BF=BD characters are = the following symbols. >> =C3=A2=C3=A3=C3=8F=C3=93 >> =20 >> =20 >> From: Stuart Tremain [mailto:webdna@idfk.com.au = ]=20 >> Sent: Monday, March 20, 2017 9:03 PM >> To: WebDNA Talk List > >> Subject: Re: [WebDNA] Upload file to mysql >> =20 >> What is the error ? >> =20 >> Kind regards >> =20 >> Stuart Tremain >> Pharoah Lane Software >> AUSTRALIA >> webdna@idfk.com.au >> =20 >> =20 >> =20 >> =20 >>=20 >> =20 >>> On 21 Mar 2017, at 12:00, Brian Boegershausen > wrote: >>> =20 >>> Mysql error. >>>=20 >>> =20 >>> Brian Boegershausen >>>=20 >>> =20 >>> =20 >>>=20 >>>=20 >>>=20 >>>=20 >>> On Mon, Mar 20, 2017 at 8:59 PM -0400, "Stuart Tremain" = > wrote: >>>=20 >>>> Brian, when you say it chokes, do you mean that WebDNA stalls or do = you get a MySQL error message ? >>>> =20 >>>> =20 >>>> Kind regards >>>> =20 >>>> Stuart Tremain >>>> Pharoah Lane Software >>>> AUSTRALIA >>>> webdna@idfk.com.au >>>> =20 >>>> =20 >>>> =20 >>>> =20 >>>>=20 >>>> =20 >>>>> On 21 Mar 2017, at 11:15, > > wrote: >>>>> =20 >>>>> Hi Stewart, >>>>> I have my content field set to MEDIUMBLOB which allows for 16mb = max files. >>>>> So far, I am using files around 100kb, so I am not reaching the = max yet. >>>>> =20 >>>>> My query writes all the data fields and uploads .txt files, but = once I change to a file like a PDF, it chokes. >>>>> =20 >>>>> [showif [referer]^file_manager.dna] >>>>> [FormVariables] >>>>> [showif [name]^filename] >>>>> [text show=3DF]TheFileNM=3D[Middle = StartAfter=3Dfilename=3D"&EndBefore=3D"][name][/middle][/text] >>>>> [/showif] >>>>> [showif [name]^CPK] >>>>> [text show=3DF]CPK=3D[value][/text] >>>>> [/showif] >>>>> [showif [name]^JPK] >>>>> [text show=3DF]JPK=3D[value][/text] >>>>> [/showif] >>>>> [/FormVariables] >>>>> =20 >>>>> [hideif [TheFileNM]=3D] >>>>> [hideif [CPK]=3D] >>>>> [hideif [JPK]=3D] >>>>> [FormVariables] >>>>> [showif [name]^"thefile"] >>>>> [SQLExecute conn_ref=3DTheBlueBiller&result_var=3DUPLOAD_INS] >>>>> INSERT INTO UPLOAD >>>>> (FILE_ID, COMPANY_ID, CLIENT_ID, JOB_ID, NAME, CONTENT, = ROW_ADDED_DTTM) >>>>> VALUES ('', '[LOGIN_COMPANY_ID]', '[CPK]', '[JPK]', '[TheFileNM]', = '[convertchars db=3Ddatabases/upload.db][value][/convertchars]', '[date = %Y-%m-%d %H:%M:%S]') >>>>> [/SQLExecute] >>>>> [/showif] >>>>> [/FormVariables] >>>>> [/hideif] >>>>> [/hideif] >>>>> [/hideif] >>>>> =20 >>>>> [!]=3D=3D=3D=3D=3D=3D=3D=3DUPLOAD.DB FILE------------[/!] >>>>> FROM TO >>>>> ' \' >>>>> " \" >>>>> \ \\ >>>>> % \% >>>>> =20 >>>>> From: Stuart Tremain [mailto:webdna@idfk.com.au = ]=20 >>>>> Sent: Monday, March 20, 2017 6:43 PM >>>>> To: WebDNA Talk List > >>>>> Subject: Re: [WebDNA] Upload file to mysql >>>>> =20 >>>>> Hi Brian >>>>> =20 >>>>> I have not done that, but providing your MySQL field is LONGBLOB = all should work.=20 >>>>> =20 >>>>> Also to be able to insert images that are bigger than 1MB you have = to increase the max_allowed_packed option in the server configuration = file. >>>>> =20 >>>>> I use Navicat to write all my queries and then copy & paset the = query into my WebDNA doc. Navicat makes writing & debugging fast. >>>>> =20 >>>>> Kind regards >>>>> =20 >>>>> Stuart Tremain >>>>> Pharoah Lane Software >>>>> AUSTRALIA >>>>> webdna@idfk.com.au >>>>> =20 >>>>> =20 >>>>> =20 >>>>> =20 >>>>>=20 >>>>> =20 >>>>>> On 21 Mar 2017, at 07:55, Brian Boegershausen = > wrote: >>>>>> =20 >>>>>> Anyone successfully upload a file to a mysql db? >>>>>> I can upload a text file but that is it. >>>>>> Jpg and gif fail. >>>>>>=20 >>>>>> Unbuntu 14 >>>>>> Webdna 8.2 >>>>>> Mysql 5.5 >>>>>>=20 >>>>>> =20 >>>>>> Brian Boegershausen >>>>>>=20 >>>>>> =20 >>>>>> =20 >>>>>> --------------------------------------------------------- This = message is sent to you because you are subscribed to the mailing list . = To unsubscribe, E-mail to: archives: = http://mail.webdna.us/list/talk@webdna.us = Bug Reporting: = support@webdna.us >>>>> =20 >>>>> =20 >>>>> = =09 >>>>> Virus-free. www.avg.com = >>>>> --------------------------------------------------------- This = message is sent to you because you are subscribed to the mailing list . = To unsubscribe, E-mail to: archives: = http://mail.webdna.us/list/talk@webdna.us = Bug Reporting: = support@webdna.us >>>>> --------------------------------------------------------- This = message is sent to you because you are subscribed to the mailing list . = To unsubscribe, E-mail to: archives: = http://mail.webdna.us/list/talk@webdna.us = Bug Reporting: = support@webdna.us >>>> =20 >>>> --------------------------------------------------------- This = message is sent to you because you are subscribed to the mailing list . = To unsubscribe, E-mail to: archives: = http://mail.webdna.us/list/talk@webdna.us = Bug Reporting: = support@webdna.us >>> --------------------------------------------------------- This = message is sent to you because you are subscribed to the mailing list . = To unsubscribe, E-mail to: archives: = http://mail.webdna.us/list/talk@webdna.us = Bug Reporting: = support@webdna.us >> =20 >> =20 >> = =09 >> Virus-free. www.avg.com = >> --------------------------------------------------------- This = message is sent to you because you are subscribed to the mailing list . = To unsubscribe, E-mail to: archives: = http://mail.webdna.us/list/talk@webdna.us = Bug Reporting: = support@webdna.us >> --------------------------------------------------------- This = message is sent to you because you are subscribed to the mailing list . = To unsubscribe, E-mail to: archives: = http://mail.webdna.us/list/talk@webdna.us = Bug Reporting: = support@webdna.us > =20 > =20 > = =09 > Virus-free. www.avg.com = > --------------------------------------------------------- This message = is sent to you because you are subscribed to the mailing list . To = unsubscribe, E-mail to: archives: = http://mail.webdna.us/list/talk@webdna.us = Bug Reporting: = support@webdna.us = ------------------------------------------------= --------- This message is sent to you because you are subscribed to the = mailing list . To unsubscribe, E-mail to: archives: = http://mail.webdna.us/list/talk@webdna.us = Bug Reporting: = support@webdna.us --Apple-Mail=_18BB7290-E5DF-4A8F-A9F1-BCEEB155A749 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 I think that is where your problem lies.

https://dev.mysql.com/doc/refman/5.7/en/string-literals.html

The MySQL manual page for strings says:

\0   An ASCII NUL = (0x00) character.
\'   A single quote = (=E2=80=9C'=E2=80=9D) character.
\"   A double = quote (=E2=80=9C"=E2=80=9D) character.
\b   A = backspace character.
\n   A newline (linefeed) = character.
\r   A carriage return = character.
\t   A tab character.
\Z   ASCII 26 (Control-Z). 
\\ =   A backslash (=E2=80=9C\=E2=80=9D) character.
\%   A =E2=80=9C%=E2=80=9D character. 
\_   A =E2=80=9C_=E2=80=9D character. 





Kind regards

Stuart Tremain
Pharoah Lane = Software
AUSTRALIA
webdna@idfk.com.au






On 21 Mar 2017, at 13:42, <brian@endeavotech.com> = <brian@endeavotech.com> wrote:

I = added the ; into my convertchars database. Flushed=E2=80=A6 still having = an issue.
I think I need a bigger list of escape = characters L
 
 
 
 
That is a problem with a character causing MySQL to = fail.
 
Looking at your = conversion db it looks like you have covered everything except for ; = (semicolon)
 
There may be something else as well.
 
Kind regards
 
Stuart Tremain
Pharoah Lane Software
AUSTRALIA
 
 
 

 

 
On 21 Mar 2017, at 12:16, <brian@endeavotech.com> = <brian@endeavotech.com> = wrote:
 
ERROR TEXT: You = have an error in your SQL syntax; check the manual that corresponds to = your MySQL server version for the right syntax to use near ''\%PDF-1.5 = \%=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD 1 0 obj = <
 
 
When I look in the errorlog.txt file, the =EF=BF=BD = characters are the following symbols.
=C3=A2=C3=A3=C3=8F=C3=93
 
 
From: Stuart Tremain [mailto:webdna@idfk.com.au] 
Sent: Monday, March 20, 2017 9:03 = PM
To: WebDNA Talk List <talk@webdna.us>
Subject: Re: [WebDNA] Upload file to = mysql
 
What is the error ?
 
Kind regards
 
Stuart Tremain
Pharoah Lane = Software
AUSTRALIA
 
 
 

 

 
On 21 Mar 2017, at 12:00, Brian = Boegershausen <brian@endeavotech.com> wrote:
 

Mysql error.

 

Brian = Boegershausen

 
 




On Mon, Mar 20, 2017 at 8:59 PM -0400, "Stuart Tremain" = <webdna@idfk.com.au> = wrote:

Brian, when you say it chokes, do you = mean that WebDNA stalls or do you get a MySQL error message ?
 
 
Kind regards
 
Stuart Tremain
Pharoah Lane = Software
AUSTRALIA
 
 
 

 

 
On 21 Mar 2017, at 11:15, <brian@endeavotech.com> <brian@endeavotech.com> wrote:
 
Hi Stewart,
I have my content field = set to MEDIUMBLOB which allows for 16mb max files.
So far, I am using files = around 100kb, so I am not reaching the max yet.
 
My query writes all the = data fields and uploads .txt files, but once I change to a file like a = PDF, it chokes.
 
[showif [referer]^file_manager.dna]
[FormVariables]
[showif = [name]^filename]
          &nb= sp;     [text show=3DF]TheFileNM=3D[Middle = StartAfter=3Dfilename=3D"&EndBefore=3D"][name][/middle][/text]<= o:p class=3D"">
[/showif]
[showif [name]^CPK]
          &nb= sp;     [text show=3DF]CPK=3D[value][/text]
[/showif]
[showif = [name]^JPK]
          &nb= sp;     [text show=3DF]JPK=3D[value][/text]
[/showif]
[/FormVariables]
 
[hideif = [TheFileNM]=3D]
[hideif [CPK]=3D]
[hideif [JPK]=3D]
[FormVariables]
[showif [name]^"thefile"]
[SQLExecute = conn_ref=3DTheBlueBiller&result_var=3DUPLOAD_INS]
INSERT INTO UPLOAD
(FILE_ID, COMPANY_ID, CLIENT_ID, JOB_ID, NAME, CONTENT, = ROW_ADDED_DTTM)
VALUES ('', = '[LOGIN_COMPANY_ID]', '[CPK]', '[JPK]', '[TheFileNM]', '[convertchars = db=3Ddatabases/upload.db][value][/convertchars]', '[date %Y-%m-%d = %H:%M:%S]')
[/SQLExecute]
[/showif]
[/FormVariables]
[/hideif]
[/hideif]
[/hideif]
 
[!]=3D=3D=3D=3D=3D=3D=3D=3DU= PLOAD.DB FILE------------[/!]
FROM   = TO
'          &n= bsp;    \'
"          &n= bsp;   \"
\          &n= bsp;   \\
%          &n= bsp; \%
 
From: Stuart Tremain [mailto:webdna@idfk.com.au] 
Sent: Monday, March 20, 2017 6:43 = PM
To: WebDNA Talk List <talk@webdna.us>
Subject: Re: [WebDNA] Upload file to = mysql
 
Hi Brian
 
I have not done that, but providing your MySQL field is = LONGBLOB all should work. 
 
Also to be able to insert images that are bigger than 1MB you = have to increase the max_allowed_packed option in the server = configuration file.
 
I use Navicat to write all my queries and then copy & = paset the query into my WebDNA doc. Navicat makes writing & = debugging fast.
 
Kind regards
 
Stuart Tremain
Pharoah Lane Software
AUSTRALIA
 
 
 

 

 
On 21 Mar 2017, at 07:55, Brian = Boegershausen <brian@endeavotech.com> wrote:
 

Anyone successfully = upload a file to a mysql db?
I can upload a text file but = that is it.
Jpg and gif fail.

Unbuntu 14
Webdna 8.2
Mysql 5.5

 

Brian = Boegershausen

 
 
--------------------------------------------------------- = This message is sent to you because you are subscribed to the mailing = list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us
 
 
Virus-free. www.avg.com
--------------------------------------------------------- = This message is sent to you because you are subscribed to the mailing = list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us
--------------------------------------------------------- = This message is sent to you because you are subscribed to the mailing = list . To = unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us
 
--------------------------------------------------------- = This message is sent to you because you are subscribed to the mailing = list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us
--------------------------------------------------------- = This message is sent to you because you are subscribed to the mailing = list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us
 
 
Virus-free. www.avg.com
--------------------------------------------------------- = This message is sent to you because you are subscribed to the mailing = list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us
--------------------------------------------------------- = This message is sent to you because you are subscribed to the mailing = list . To = unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us
 
 
Virus-free. www.avg.com
--------------------------------------------------------- = This message is sent to you because you are subscribed to the mailing = list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us
--------------------------------------------------------- = This message is sent to you because you are subscribed to the mailing = list . To unsubscribe, E-mail = to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us
= --------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us --Apple-Mail=_18BB7290-E5DF-4A8F-A9F1-BCEEB155A749-- . Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] Upload file to mysql (Brian Boegershausen 2017)
  2. Re: [WebDNA] Upload file to mysql (Stuart Tremain 2017)
  3. Re: [WebDNA] Upload file to mysql (Brian Boegershausen 2017)
  4. Re: [WebDNA] Upload file to mysql (Stuart Tremain 2017)
  5. Re: [WebDNA] Upload file to mysql (Stuart Tremain 2017)
  6. Re: [WebDNA] Upload file to mysql (Brian Boegershausen 2017)
  7. Re: [WebDNA] Upload file to mysql (Stuart Tremain 2017)
  8. RE: [WebDNA] Upload file to mysql ( 2017)
  9. Re: [WebDNA] Upload file to mysql (Stuart Tremain 2017)
  10. RE: [WebDNA] Upload file to mysql ( 2017)
  11. Re: [WebDNA] Upload file to mysql (Stuart Tremain 2017)
  12. Re: [WebDNA] Upload file to mysql (Brian Boegershausen 2017)
  13. Re: [WebDNA] Upload file to mysql (Stuart Tremain 2017)
  14. RE: [WebDNA] Upload file to mysql ( 2017)
  15. [BULK] Re: [WebDNA] Upload file to mysql ("WJ Starck, DDS" 2017)
  16. Re: [WebDNA] Upload file to mysql (Stuart Tremain 2017)
  17. [WebDNA] Upload file to mysql (Brian Boegershausen 2017)
1078 --Apple-Mail=_18BB7290-E5DF-4A8F-A9F1-BCEEB155A749 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 I think that is where your problem lies. https://dev.mysql.com/doc/refman/5.7/en/string-literals.html The MySQL manual page for strings says: \0 An ASCII NUL (0x00) character. \' A single quote (=E2=80=9C'=E2=80=9D) character. \" A double quote (=E2=80=9C"=E2=80=9D) character. \b A backspace character. \n A newline (linefeed) character. \r A carriage return character. \t A tab character. \Z ASCII 26 (Control-Z).=20 \\ A backslash (=E2=80=9C\=E2=80=9D) character. \% A =E2=80=9C%=E2=80=9D character.=20 \_ A =E2=80=9C_=E2=80=9D character.=20 Kind regards Stuart Tremain Pharoah Lane Software AUSTRALIA webdna@idfk.com.au > On 21 Mar 2017, at 13:42, = wrote: >=20 > I added the ; into my convertchars database. Flushed=E2=80=A6 still = having an issue. > I think I need a bigger list of escape characters L > =20 > =20 > =20 > From: Stuart Tremain [mailto:webdna@idfk.com.au = ]=20 > Sent: Monday, March 20, 2017 9:45 PM > To: WebDNA Talk List > > Subject: Re: [WebDNA] Upload file to mysql > =20 > That is a problem with a character causing MySQL to fail. > =20 > Looking at your conversion db it looks like you have covered = everything except for ; (semicolon) > =20 > There may be something else as well. > =20 > Kind regards > =20 > Stuart Tremain > Pharoah Lane Software > AUSTRALIA > webdna@idfk.com.au > =20 > =20 > =20 > =20 >=20 > =20 >> On 21 Mar 2017, at 12:16, > > wrote: >> =20 >> ERROR TEXT: You have an error in your SQL syntax; check the manual = that corresponds to your MySQL server version for the right syntax to = use near ''\%PDF-1.5 \%=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD 1 0 obj < >> =20 >> =20 >> When I look in the errorlog.txt file, the =EF=BF=BD characters are = the following symbols. >> =C3=A2=C3=A3=C3=8F=C3=93 >> =20 >> =20 >> From: Stuart Tremain [mailto:webdna@idfk.com.au = ]=20 >> Sent: Monday, March 20, 2017 9:03 PM >> To: WebDNA Talk List > >> Subject: Re: [WebDNA] Upload file to mysql >> =20 >> What is the error ? >> =20 >> Kind regards >> =20 >> Stuart Tremain >> Pharoah Lane Software >> AUSTRALIA >> webdna@idfk.com.au >> =20 >> =20 >> =20 >> =20 >>=20 >> =20 >>> On 21 Mar 2017, at 12:00, Brian Boegershausen > wrote: >>> =20 >>> Mysql error. >>>=20 >>> =20 >>> Brian Boegershausen >>>=20 >>> =20 >>> =20 >>>=20 >>>=20 >>>=20 >>>=20 >>> On Mon, Mar 20, 2017 at 8:59 PM -0400, "Stuart Tremain" = > wrote: >>>=20 >>>> Brian, when you say it chokes, do you mean that WebDNA stalls or do = you get a MySQL error message ? >>>> =20 >>>> =20 >>>> Kind regards >>>> =20 >>>> Stuart Tremain >>>> Pharoah Lane Software >>>> AUSTRALIA >>>> webdna@idfk.com.au >>>> =20 >>>> =20 >>>> =20 >>>> =20 >>>>=20 >>>> =20 >>>>> On 21 Mar 2017, at 11:15, > > wrote: >>>>> =20 >>>>> Hi Stewart, >>>>> I have my content field set to MEDIUMBLOB which allows for 16mb = max files. >>>>> So far, I am using files around 100kb, so I am not reaching the = max yet. >>>>> =20 >>>>> My query writes all the data fields and uploads .txt files, but = once I change to a file like a PDF, it chokes. >>>>> =20 >>>>> [showif [referer]^file_manager.dna] >>>>> [formvariables] >>>>> [showif [name]^filename] >>>>> [text show=3DF]TheFileNM=3D[Middle = StartAfter=3Dfilename=3D"&EndBefore=3D"][name][/middle][/text] >>>>> [/showif] >>>>> [showif [name]^CPK] >>>>> [text show=3DF]CPK=3D[value][/text] >>>>> [/showif] >>>>> [showif [name]^JPK] >>>>> [text show=3DF]JPK=3D[value][/text] >>>>> [/showif] >>>>> [/FormVariables] >>>>> =20 >>>>> [hideif [TheFileNM]=3D] >>>>> [hideif [CPK]=3D] >>>>> [hideif [JPK]=3D] >>>>> [formvariables] >>>>> [showif [name]^"thefile"] >>>>> [SQLExecute conn_ref=3DTheBlueBiller&result_var=3DUPLOAD_INS] >>>>> INSERT INTO UPLOAD >>>>> (FILE_ID, COMPANY_ID, CLIENT_ID, JOB_ID, NAME, CONTENT, = ROW_ADDED_DTTM) >>>>> VALUES ('', '[LOGIN_COMPANY_ID]', '[CPK]', '[JPK]', '[TheFileNM]', = '[convertchars db=3Ddatabases/upload.db][value][/convertchars]', '[date = %Y-%m-%d %H:%M:%S]') >>>>> [/SQLExecute] >>>>> [/showif] >>>>> [/FormVariables] >>>>> [/hideif] >>>>> [/hideif] >>>>> [/hideif] >>>>> =20 >>>>> [!]=3D=3D=3D=3D=3D=3D=3D=3DUPLOAD.DB FILE------------[/!] >>>>> FROM TO >>>>> ' \' >>>>> " \" >>>>> \ \\ >>>>> % \% >>>>> =20 >>>>> From: Stuart Tremain [mailto:webdna@idfk.com.au = ]=20 >>>>> Sent: Monday, March 20, 2017 6:43 PM >>>>> To: WebDNA Talk List > >>>>> Subject: Re: [WebDNA] Upload file to mysql >>>>> =20 >>>>> Hi Brian >>>>> =20 >>>>> I have not done that, but providing your MySQL field is LONGBLOB = all should work.=20 >>>>> =20 >>>>> Also to be able to insert images that are bigger than 1MB you have = to increase the max_allowed_packed option in the server configuration = file. >>>>> =20 >>>>> I use Navicat to write all my queries and then copy & paset the = query into my WebDNA doc. Navicat makes writing & debugging fast. >>>>> =20 >>>>> Kind regards >>>>> =20 >>>>> Stuart Tremain >>>>> Pharoah Lane Software >>>>> AUSTRALIA >>>>> webdna@idfk.com.au >>>>> =20 >>>>> =20 >>>>> =20 >>>>> =20 >>>>>=20 >>>>> =20 >>>>>> On 21 Mar 2017, at 07:55, Brian Boegershausen = > wrote: >>>>>> =20 >>>>>> Anyone successfully upload a file to a mysql db? >>>>>> I can upload a text file but that is it. >>>>>> Jpg and gif fail. >>>>>>=20 >>>>>> Unbuntu 14 >>>>>> Webdna 8.2 >>>>>> Mysql 5.5 >>>>>>=20 >>>>>> =20 >>>>>> Brian Boegershausen >>>>>>=20 >>>>>> =20 >>>>>> =20 >>>>>> --------------------------------------------------------- This = message is sent to you because you are subscribed to the mailing list . = To unsubscribe, E-mail to: archives: = http://mail.webdna.us/list/talk@webdna.us = Bug Reporting: = support@webdna.us >>>>> =20 >>>>> =20 >>>>> = =09 >>>>> Virus-free. www.avg.com = >>>>> --------------------------------------------------------- This = message is sent to you because you are subscribed to the mailing list . = To unsubscribe, E-mail to: archives: = http://mail.webdna.us/list/talk@webdna.us = Bug Reporting: = support@webdna.us >>>>> --------------------------------------------------------- This = message is sent to you because you are subscribed to the mailing list . = To unsubscribe, E-mail to: archives: = http://mail.webdna.us/list/talk@webdna.us = Bug Reporting: = support@webdna.us >>>> =20 >>>> --------------------------------------------------------- This = message is sent to you because you are subscribed to the mailing list . = To unsubscribe, E-mail to: archives: = http://mail.webdna.us/list/talk@webdna.us = Bug Reporting: = support@webdna.us >>> --------------------------------------------------------- This = message is sent to you because you are subscribed to the mailing list . = To unsubscribe, E-mail to: archives: = http://mail.webdna.us/list/talk@webdna.us = Bug Reporting: = support@webdna.us >> =20 >> =20 >> = =09 >> Virus-free. www.avg.com = >> --------------------------------------------------------- This = message is sent to you because you are subscribed to the mailing list . = To unsubscribe, E-mail to: archives: = http://mail.webdna.us/list/talk@webdna.us = Bug Reporting: = support@webdna.us >> --------------------------------------------------------- This = message is sent to you because you are subscribed to the mailing list . = To unsubscribe, E-mail to: archives: = http://mail.webdna.us/list/talk@webdna.us = Bug Reporting: = support@webdna.us > =20 > =20 > = =09 > Virus-free. www.avg.com = > --------------------------------------------------------- This message = is sent to you because you are subscribed to the mailing list . To = unsubscribe, E-mail to: archives: = http://mail.webdna.us/list/talk@webdna.us = Bug Reporting: = support@webdna.us = ------------------------------------------------= --------- This message is sent to you because you are subscribed to the = mailing list . To unsubscribe, E-mail to: archives: = http://mail.webdna.us/list/talk@webdna.us = Bug Reporting: = support@webdna.us --Apple-Mail=_18BB7290-E5DF-4A8F-A9F1-BCEEB155A749 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 I think that is where your problem lies.

https://dev.mysql.com/doc/refman/5.7/en/string-literals.html

The MySQL manual page for strings says:

\0   An ASCII NUL = (0x00) character.
\'   A single quote = (=E2=80=9C'=E2=80=9D) character.
\"   A double = quote (=E2=80=9C"=E2=80=9D) character.
\b   A = backspace character.
\n   A newline (linefeed) = character.
\r   A carriage return = character.
\t   A tab character.
\Z   ASCII 26 (Control-Z). 
\\ =   A backslash (=E2=80=9C\=E2=80=9D) character.
\%   A =E2=80=9C%=E2=80=9D character. 
\_   A =E2=80=9C_=E2=80=9D character. 





Kind regards

Stuart Tremain
Pharoah Lane = Software
AUSTRALIA
webdna@idfk.com.au






On 21 Mar 2017, at 13:42, <brian@endeavotech.com> = <brian@endeavotech.com> wrote:

I = added the ; into my convertchars database. Flushed=E2=80=A6 still having = an issue.
I think I need a bigger list of escape = characters L
 
 
 
 
That is a problem with a character causing MySQL to = fail.
 
Looking at your = conversion db it looks like you have covered everything except for ; = (semicolon)
 
There may be something else as well.
 
Kind regards
 
Stuart Tremain
Pharoah Lane Software
AUSTRALIA
 
 
 

 

 
On 21 Mar 2017, at 12:16, <brian@endeavotech.com> = <brian@endeavotech.com> = wrote:
 
ERROR TEXT: You = have an error in your SQL syntax; check the manual that corresponds to = your MySQL server version for the right syntax to use near ''\%PDF-1.5 = \%=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD 1 0 obj = <
 
 
When I look in the errorlog.txt file, the =EF=BF=BD = characters are the following symbols.
=C3=A2=C3=A3=C3=8F=C3=93
 
 
From: Stuart Tremain [mailto:webdna@idfk.com.au] 
Sent: Monday, March 20, 2017 9:03 = PM
To: WebDNA Talk List <talk@webdna.us>
Subject: Re: [WebDNA] Upload file to = mysql
 
What is the error ?
 
Kind regards
 
Stuart Tremain
Pharoah Lane = Software
AUSTRALIA
 
 
 

 

 
On 21 Mar 2017, at 12:00, Brian = Boegershausen <brian@endeavotech.com> wrote:
 

Mysql error.

 

Brian = Boegershausen

 
 




On Mon, Mar 20, 2017 at 8:59 PM -0400, "Stuart Tremain" = <webdna@idfk.com.au> = wrote:

Brian, when you say it chokes, do you = mean that WebDNA stalls or do you get a MySQL error message ?
 
 
Kind regards
 
Stuart Tremain
Pharoah Lane = Software
AUSTRALIA
 
 
 

 

 
On 21 Mar 2017, at 11:15, <brian@endeavotech.com> <brian@endeavotech.com> wrote:
 
Hi Stewart,
I have my content field = set to MEDIUMBLOB which allows for 16mb max files.
So far, I am using files = around 100kb, so I am not reaching the max yet.
 
My query writes all the = data fields and uploads .txt files, but once I change to a file like a = PDF, it chokes.
 
[showif [referer]^file_manager.dna]
[showif = [name]^filename]
          &nb= sp;     [text show=3DF]TheFileNM=3D[Middle = StartAfter=3Dfilename=3D"&EndBefore=3D"][name][/middle][/text]<= o:p class=3D"">
[/showif]
[showif [name]^CPK]
          &nb= sp;     [text show=3DF]CPK=3D[value][/text]
[/showif]
[showif = [name]^JPK]
          &nb= sp;     [text show=3DF]JPK=3D[value][/text]
[/showif]
[/FormVariables]
 
[hideif = [TheFileNM]=3D]
[hideif [CPK]=3D]
[hideif [JPK]=3D]
[showif [name]^"thefile"]
[SQLExecute = conn_ref=3DTheBlueBiller&result_var=3DUPLOAD_INS]
INSERT INTO UPLOAD
(FILE_ID, COMPANY_ID, CLIENT_ID, JOB_ID, NAME, CONTENT, = ROW_ADDED_DTTM)
VALUES ('', = '[LOGIN_COMPANY_ID]', '[CPK]', '[JPK]', '[TheFileNM]', '[convertchars = db=3Ddatabases/upload.db][value][/convertchars]', '[date %Y-%m-%d = %H:%M:%S]')
[/SQLExecute]
[/showif]
[/FormVariables]
[/hideif]
[/hideif]
[/hideif]
 
[!]=3D=3D=3D=3D=3D=3D=3D=3DU= PLOAD.DB FILE------------[/!]
FROM   = TO
'          &n= bsp;    \'
"          &n= bsp;   \"
\          &n= bsp;   \\
%          &n= bsp; \%
 
From: Stuart Tremain [mailto:webdna@idfk.com.au] 
Sent: Monday, March 20, 2017 6:43 = PM
To: WebDNA Talk List <talk@webdna.us>
Subject: Re: [WebDNA] Upload file to = mysql
 
Hi Brian
 
I have not done that, but providing your MySQL field is = LONGBLOB all should work. 
 
Also to be able to insert images that are bigger than 1MB you = have to increase the max_allowed_packed option in the server = configuration file.
 
I use Navicat to write all my queries and then copy & = paset the query into my WebDNA doc. Navicat makes writing & = debugging fast.
 
Kind regards
 
Stuart Tremain
Pharoah Lane Software
AUSTRALIA
 
 
 

 

 
On 21 Mar 2017, at 07:55, Brian = Boegershausen <brian@endeavotech.com> wrote:
 

Anyone successfully = upload a file to a mysql db?
I can upload a text file but = that is it.
Jpg and gif fail.

Unbuntu 14
Webdna 8.2
Mysql 5.5

 

Brian = Boegershausen

 
 
--------------------------------------------------------- = This message is sent to you because you are subscribed to the mailing = list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us
 
 
Virus-free. www.avg.com
--------------------------------------------------------- = This message is sent to you because you are subscribed to the mailing = list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us
--------------------------------------------------------- = This message is sent to you because you are subscribed to the mailing = list . To = unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us
 
--------------------------------------------------------- = This message is sent to you because you are subscribed to the mailing = list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us
--------------------------------------------------------- = This message is sent to you because you are subscribed to the mailing = list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us
 
 
Virus-free. www.avg.com
--------------------------------------------------------- = This message is sent to you because you are subscribed to the mailing = list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us
--------------------------------------------------------- = This message is sent to you because you are subscribed to the mailing = list . To = unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us
 
 
Virus-free. www.avg.com
--------------------------------------------------------- = This message is sent to you because you are subscribed to the mailing = list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us
--------------------------------------------------------- = This message is sent to you because you are subscribed to the mailing = list . To unsubscribe, E-mail = to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us
= --------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us --Apple-Mail=_18BB7290-E5DF-4A8F-A9F1-BCEEB155A749-- . Stuart Tremain

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Re:no [search] with NT (1997) no global [username] or [password] displayed ... (1997) oops private message leaked into talk list (1997) [ShowIf] if the varieable exists (1998) Running _every_ page through WebCat-error.html (1997) special commerce fields (1997) forms and variables (1998) Scientific Notation Problem (2001) [WebDNA] Sorry WebDNA server not running (2015) (2000) Help please.... trouble with a [text] showing (2000) webcat method for waiting specific amount of time? (2000) More questions about serial number dishing (1997) If Empty ? (1997) Applescript, WebDNA, and PDF (1997) WebCatalog in the search engines (2001) [WriteFile] problems (1997) WebCat2 - Getting to the browser's username/password data (1997) WebCatalog.acgi quitting with error Type 2 (1998) Nesting format tags (1997)