Re: [WebDNA] Upload file to mysql

This WebDNA talk-list message is from

2017


It keeps the original formatting.
numero = 113484
interpreted = N
texte = 1079 ------=_Part_8836_1840953663.1490064689602 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable You think i should [url]ize the string? Then i can look for %0A and things like that. Brian Boegershausen On Mon, Mar 20, 2017 at 10:49 PM -0400, "Stuart Tremain" wrote: 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 =C2=A0 An ASCII NUL (0x00) character.\' =C2=A0 A single quote (=E2=80=9C= '=E2=80=9D) character.\" =C2=A0 A double quote (=E2=80=9C"=E2=80=9D) charac= ter.\b =C2=A0 A backspace character. =C2=A0 A newline (linefeed) character.\r =C2=A0 A carriage return characte= r.\t =C2=A0 A tab character.\Z =C2=A0 ASCII 26 (Control-Z).=C2=A0\\ =C2=A0 = A backslash (=E2=80=9C\=E2=80=9D) character.\% =C2=A0 A =E2=80=9C%=E2=80=9D= character.=C2=A0\_ =C2=A0 A =E2=80=9C_=E2=80=9D character.=C2=A0 Kind regards Stuart TremainPharoah Lane SoftwareAUSTRALIAwebdna@idfk.com.au On 21 Mar 2017, at 13:42, w= rote: 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=C2=A0L=C2=A0=C2= =A0=C2=A0From:=C2=A0Stuart Tremain [mailto:webdna@idfk.com.au]=C2=A0 Sent:=C2=A0Monday, March 20, 2017 9:45 PM To:=C2=A0WebDNA Talk List Subject:=C2=A0Re: [WebDNA] Upload file to mysql=C2=A0That is a problem with= a character causing MySQL to fail.=C2=A0Looking at your conversion db it l= ooks like you have covered everything except for ; (semicolon)=C2=A0There m= ay be something else as well.=C2=A0Kind regards=C2=A0Stuart TremainPharoah = Lane SoftwareAUSTRALIAwebdna@idfk.com.au=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0On 21 Mar 2017, at 12:16, wrote:=C2=A0ERROR TEXT: You have an error in your SQL syntax; ch= eck 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=C2=A0= 1 0 obj <=C2=A0=C2=A0When I look in the errorlog.txt file, the=C2=A0=EF=BF= =BD characters=C2=A0are the following symbols.=C3=A2=C3=A3=C3=8F=C3=93=C2= =A0=C2=A0From:=C2=A0Stuart Tremain [mailto:webdna@idfk.com.au]=C2=A0 Sent:=C2=A0Monday, March 20, 2017 9:03 PM To:=C2=A0WebDNA Talk List Subject:=C2=A0Re: [WebDNA] Upload file to mysql=C2=A0What is the error ?=C2= =A0Kind regards=C2=A0Stuart TremainPharoah Lane SoftwareAUSTRALIAwebdna@idf= k.com.au=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0On 21 Mar 2017, at 12:00, Brian Boegershausen wrote:=C2=A0 Mysql error.=C2=A0 Brian Boegershausen=C2=A0=C2=A0 On Mon, Mar 20, 2017 at 8:59 PM -0400, "Stuart Tremain" wrote:Brian, when you say it chokes, do you mean that WebDNA stalls or do= you get a MySQL error message ?=C2=A0=C2=A0Kind regards=C2=A0Stuart Tremai= nPharoah Lane SoftwareAUSTRALIAwebdna@idfk.com.au=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0On 21 Mar 2017, at 11:15, wrote:=C2=A0Hi 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.=C2=A0My query writes all the data fields and= uploads .txt files, but once I change to a file like a PDF, it chokes.=C2= =A0[showif [referer]^file_manager.dna][FormVariables][showif [name]^filenam= e]=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 [text show=3DF]TheFileNM=3D[Middle StartAfter=3Dfilename= =3D"&EndBefore=3D"][name][/middle][/text][/showif][showif [name]^CPK]=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 [text show=3DF]CPK=3D[value][/text][/showif][showif [name]^JPK]= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 [text show=3DF]JPK=3D[value][/text][/showif][/FormVariables= ]=C2=A0[hideif [TheFileNM]=3D][hideif [CPK]=3D][hideif [JPK]=3D][FormVariab= les][showif [name]^"thefile"][SQLExecute conn_ref=3DTheBlueBiller&result_va= r=3DUPLOAD_INS]INSERT INTO UPLOAD(FILE_ID, COMPANY_ID, CLIENT_ID, JOB_ID, N= AME, CONTENT, ROW_ADDED_DTTM)VALUES ('', '[LOGIN_COMPANY_ID]', '[CPK]', '[J= PK]', '[TheFileNM]', '[convertchars db=3Ddatabases/upload.db][value][/conve= rtchars]', '[date %Y-%m-%d %H:%M:%S]')[/SQLExecute][/showif][/FormVariables= ][/hideif][/hideif][/hideif]=C2=A0[!]=3D=3D=3D=3D=3D=3D=3D=3DUPLOAD.DB FILE= ------------[/!]FROM=C2=A0=C2=A0 TO'=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 \'"=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 \"\=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 \\%=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 \%=C2=A0From:= =C2=A0Stuart Tremain [mailto:webdna@idfk.com.au]=C2=A0 Sent:=C2=A0Monday, March 20, 2017 6:43 PM To:=C2=A0WebDNA Talk List Subject:=C2=A0Re: [WebDNA] Upload file to mysql=C2=A0Hi Brian=C2=A0I have n= ot done that, but providing your MySQL field is LONGBLOB all should work.= =C2=A0=C2=A0Also to be able to insert images that are bigger than 1MB you h= ave to increase the max_allowed_packed option in the server configuration f= ile.=C2=A0I use Navicat to write all my queries and then copy & paset the q= uery into my WebDNA doc. Navicat makes writing & debugging fast.=C2=A0Kind = regards=C2=A0Stuart TremainPharoah Lane SoftwareAUSTRALIAwebdna@idfk.com.au= =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0On 21 Mar 2017, at 07:55, Brian Boegershausen wrote:=C2=A0 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=C2=A0 Brian Boegershausen=C2=A0=C2=A0--------------------------------------------= ------------- This message is sent to you because you are subscribed to the= mailing list . To unsubscribe, E-mail to: archives:=C2=A0http://mail.webdn= a.us/list/talk@webdna.us=C2=A0Bug Reporting:=C2=A0support@webdna.us=C2=A0= =C2=A0Virus-free.=C2=A0www.avg.com-----------------------------------------= ---------------- This message is sent to you because you are subscribed to = the mailing list . To unsubscribe, E-mail to: archives:=C2=A0http://mail.we= bdna.us/list/talk@webdna.us=C2=A0Bug Reporting:=C2=A0support@webdna.us-----= ---------------------------------------------------- This message is sent t= o you because you are subscribed to the mailing list=C2=A0. To unsubscribe,= E-mail to:=C2=A0archives:=C2=A0http://mail.webdna.us/list/talk@webdna.us= =C2=A0Bug Reporting:=C2=A0support@webdna.us=C2=A0--------------------------= ------------------------------- This message is sent to you because you are= subscribed to the mailing list . To unsubscribe, E-mail to: archives:=C2= =A0http://mail.webdna.us/list/talk@webdna.us=C2=A0Bug Reporting:=C2=A0suppo= rt@webdna.us--------------------------------------------------------- This = message is sent to you because you are subscribed to the mailing list . To = unsubscribe, E-mail to: archives:=C2=A0http://mail.webdna.us/list/talk@webd= na.us=C2=A0Bug Reporting:=C2=A0support@webdna.us=C2=A0=C2=A0Virus-free.=C2= =A0www.avg.com--------------------------------------------------------- Thi= s message is sent to you because you are subscribed to the mailing list . T= o unsubscribe, E-mail to: archives:=C2=A0http://mail.webdna.us/list/talk@we= bdna.us=C2=A0Bug Reporting:=C2=A0support@webdna.us-------------------------= -------------------------------- This message is sent to you because you ar= e subscribed to the mailing list=C2=A0. To unsubscribe, E-mail to:=C2=A0arc= hives:=C2=A0http://mail.webdna.us/list/talk@webdna.us=C2=A0Bug Reporting:= =C2=A0support@webdna.us=C2=A0=C2=A0Virus-free.=C2=A0www.avg.com------------= --------------------------------------------- This message is sent to you b= ecause you are subscribed to the mailing list . To unsubscribe, E-mail to: = archives:=C2=A0http://mail.webdna.us/list/talk@webdna.us=C2=A0Bug Reporting= :=C2=A0support@webdna.us---------------------------------------------------= ------ This message is sent to you because you are subscribed to the mailin= g list=C2=A0. To unsubscribe, E-mail to:=C2=A0archives:=C2=A0http://mail.we= bdna.us/list/talk@webdna.us=C2=A0Bug Reporting:=C2=A0support@webdna.us --------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to:=20 archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us ------=_Part_8836_1840953663.1490064689602 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable

You think i should [url]ize the str= ing?
Then i can look for %0A and things like that.

Brian Boegershausen





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

I t= hink that is where your problem lies.

<= div class=3D"">https://dev.mysql.com/doc/refman/5.7/en/string-lite= rals.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 &n= bsp; A tab character.
\Z   ASCII 26 (Control-Z).&= nbsp;
\\   A backslash (=E2=80=9C\=E2=80=9D) char= acter.
\%   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
 
 =
&nbs= p;
<= span style=3D"font-size: 11pt; font-family: Calibri, sans-serif;" class=3D"= ">From: Stu= art Tremain [mailto:webdna@idfk.com.au] 
= Sent: Monday, March 2= 0, 2017 9:45 PM
To: WebDNA Talk List <talk= @webdna.us>
Subject: Re: [WebDNA] Upload file to mysql
 
That is a = problem with a character causing MySQL to fail.
=
 
Looking at y= our conversion db it looks like you have covered everything except for ; (s= emicolon)
 
There may be something else as well.
=  
Kind regards
 
Stuart Tremain
Pharoah Lane Software
AUSTRALIA
<= span style=3D"font-size: 9pt; font-family: Helvetica, sans-serif;" class=3D= ""> 
 
 

=  

&nbs= p;
On 21 Mar 2017, at 12:16, <br= ian@endeavotech.com> <brian@endeavo= tech.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 synt= ax to use near ''\%PDF-1.5 \%=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD&= nbsp;1= 0 obj <
 
 
<= span style=3D"font-size: 11pt; font-family: Calibri, sans-serif;" class=3D"= ">When I look in the errorlog.txt file, the =EF=BF=BD characters <= /span>are the following symbols.
=C3=A2=C3=A3=C3=8F=C3= =93
 
 <= /o:p>
From:&nbs= p;Stuart Tremain [mailto:webdna@idfk.com.au] 
Se= nt: Monday, March 20,= 2017 9:03 PM
To: WebDNA Talk List <talk@webdna.us>
Subject: = ;Re: [WebDNA] Upload file to mysql
 <= o:p class=3D"">
What is the error ?
 
= Kind regards
=
 
Stuart Tremain
Pharoah Lane Software
=
AUSTRA= LIA
webdna@idfk.com.au<= o:p class=3D"">
 
<= /div>
 = ;
 

 

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

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 yo= u mean that WebDNA stalls or do you get a MySQL error message ?
 
 
Kind regards
&n= bsp;
Stuart Tremain
Pharoah Lane Software
AUSTRALIA
=
 
 
 

 

 
On 21 Mar 2017, at 11:15, <brian@e= ndeavotech.com> <brian@endeavotech.com> wrote:<= o:p class=3D"">
 
Hi Stewart,
I have my content field set to MEDIUM= BLOB which allows for 16mb max files.
<= span style=3D"font-size: 11pt; font-family: Calibri, sans-serif;" class=3D"= ">So far, I am using files around 100kb, so I am not reaching the max yet.<= /span>
 <= /div>
My query writes all the data fields and uploads .txt files, but o= nce I change to a file like a PDF, it chokes.<= /div>
 
[showif [referer]= ^file_manager.dna]
[FormVariables]
[showif [name]^filename]
        =         [text show=3DF]TheFileNM=3D[Midd= le StartAfter=3Dfilename=3D"&EndBefore=3D"][name][/middle][/text]
[/showif]
[showif [name]^CPK]
=
 &= nbsp;           &nbs= p;  [text show=3DF]CPK=3D[value][/text]
[/showif]
[showif [name]^JP= K]
     &nb= sp;          [text show=3DF]JP= K=3D[value][/text]
[/showif]<= o:p class=3D"">
[/FormVariables]
 
[hideif [TheFile= NM]=3D]
<= span style=3D"font-size: 11pt; font-family: Calibri, sans-serif;" class=3D"= ">[hideif [CPK]=3D]
[hideif [JPK]=3D]
[FormVariables]
[showif [name]^"thefile"]
<= div class=3D"">
[SQLExecute conn_ref=3DT= heBlueBiller&result_var=3DUPLOAD_INS]
INSERT INTO UPLOAD=
(FILE_ID, COMPANY_ID, CLIENT_I= D, 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=3DUPLOAD.DB FILE------------[/!]
<= /div>
FROM   TO
' &= nbsp;           &nbs= p; \'
"     = ;         \"=
\         &nb= sp;    \\
% &nbs= p;          \%
 
= From:&= nbsp;Stuart Tremain [mailto:webdna@idfk.com.au] 
S= ent: Monday, March 20= , 2017 6:43 PM
To: WebDNA Talk List <talk@webdna.us
>
Subject: = ;Re: [WebDNA] Upload file to mysql
 
Hi Brian=
 <= /o:p>
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 t= o increase the max_allowed_packed option in the server configuration file.<= o:p class=3D"">
 
I use Navicat to write all my queries and= then copy & paset the query into my WebDNA doc. Navicat makes writing = & debugging fast.
&n= bsp;
Kind regards
 
<= /div>
Stuart Tremain
Pharoah Lane Software
= AUSTRALIA
 
 
<= /div>
 

 

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

Anyo= ne successfully upload a file to a mysql db?
I can upload a t= ext 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-mai= l to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us
 
=
 
<= div class=3D"">
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:&nb= sp;http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us
= --------------------------------------------------------- This messag= e 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 y= ou because you are subscribed to the mailing list . To unsubscribe, E-mail = to: archives: h= ttp://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 unsubscrib= e, E-mail to: archives: <= a href=3D"http://mail.webdna.us/list/talk@webdna.us" style=3D"color: purple= ; text-decoration: underline;" class=3D"">http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us
 
 
Virus-free. www.a= vg.com
-----------------= ---------------------------------------- This message is sent to you becaus= e you are subscribed to the mailing list . To unsubscribe, E-mail to: archi= ves: http://mai= l.webdna.us/list/talk@webdna.us Bug Reporting: = ;support@webdna.us
------------------------------------------------= --------- This message is sent to you because you are subscribed to the mai= ling list . To uns= ubscribe, E-mail to: arch= ives: http://ma= il.webdna.us/list/talk@webdna.us Bug Reporting:&nbs= p;support@webdna.us
 
=
 
Virus-free. www.avg.com
------------= --------------------------------------------- This message is sent to you b= ecause you are subscribed to the mailing list . To unsubscribe, E-mail to: = archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@w= ebdna.us
-------------------------------------------= -------------- This message is sent to you because you are subscribed to th= e 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 ------=_Part_8836_1840953663.1490064689602-- . 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)
1079 ------=_Part_8836_1840953663.1490064689602 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable You think i should
[url]ize the string? Then i can look for %0A and things like that. Brian Boegershausen On Mon, Mar 20, 2017 at 10:49 PM -0400, "Stuart Tremain" wrote: 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 =C2=A0 An ASCII NUL (0x00) character.\' =C2=A0 A single quote (=E2=80=9C= '=E2=80=9D) character.\" =C2=A0 A double quote (=E2=80=9C"=E2=80=9D) charac= ter.\b =C2=A0 A backspace character. =C2=A0 A newline (linefeed) character.\r =C2=A0 A carriage return characte= r.\t =C2=A0 A tab character.\Z =C2=A0 ASCII 26 (Control-Z).=C2=A0\\ =C2=A0 = A backslash (=E2=80=9C\=E2=80=9D) character.\% =C2=A0 A =E2=80=9C%=E2=80=9D= character.=C2=A0\_ =C2=A0 A =E2=80=9C_=E2=80=9D character.=C2=A0 Kind regards Stuart TremainPharoah Lane SoftwareAUSTRALIAwebdna@idfk.com.au On 21 Mar 2017, at 13:42, w= rote: 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=C2=A0L=C2=A0=C2= =A0=C2=A0From:=C2=A0Stuart Tremain [mailto:webdna@idfk.com.au]=C2=A0 Sent:=C2=A0Monday, March 20, 2017 9:45 PM To:=C2=A0WebDNA Talk List Subject:=C2=A0Re: [WebDNA] Upload file to mysql=C2=A0That is a problem with= a character causing MySQL to fail.=C2=A0Looking at your conversion db it l= ooks like you have covered everything except for ; (semicolon)=C2=A0There m= ay be something else as well.=C2=A0Kind regards=C2=A0Stuart TremainPharoah = Lane SoftwareAUSTRALIAwebdna@idfk.com.au=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0On 21 Mar 2017, at 12:16, wrote:=C2=A0ERROR TEXT: You have an error in your SQL syntax; ch= eck 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=C2=A0= 1 0 obj <=C2=A0=C2=A0When I look in the errorlog.txt file, the=C2=A0=EF=BF= =BD characters=C2=A0are the following symbols.=C3=A2=C3=A3=C3=8F=C3=93=C2= =A0=C2=A0From:=C2=A0Stuart Tremain [mailto:webdna@idfk.com.au]=C2=A0 Sent:=C2=A0Monday, March 20, 2017 9:03 PM To:=C2=A0WebDNA Talk List Subject:=C2=A0Re: [WebDNA] Upload file to mysql=C2=A0What is the error ?=C2= =A0Kind regards=C2=A0Stuart TremainPharoah Lane SoftwareAUSTRALIAwebdna@idf= k.com.au=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0On 21 Mar 2017, at 12:00, Brian Boegershausen wrote:=C2=A0 Mysql error.=C2=A0 Brian Boegershausen=C2=A0=C2=A0 On Mon, Mar 20, 2017 at 8:59 PM -0400, "Stuart Tremain" wrote:Brian, when you say it chokes, do you mean that WebDNA stalls or do= you get a MySQL error message ?=C2=A0=C2=A0Kind regards=C2=A0Stuart Tremai= nPharoah Lane SoftwareAUSTRALIAwebdna@idfk.com.au=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0On 21 Mar 2017, at 11:15, wrote:=C2=A0Hi 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.=C2=A0My query writes all the data fields and= uploads .txt files, but once I change to a file like a PDF, it chokes.=C2= =A0[showif [referer]^file_manager.dna][formvariables][showif [name]^filenam= e]=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 [text show=3DF]TheFileNM=3D[Middle StartAfter=3Dfilename= =3D"&EndBefore=3D"][name][/middle][/text][/showif][showif [name]^CPK]=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 [text show=3DF]CPK=3D[value][/text][/showif][showif [name]^JPK]= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 [text show=3DF]JPK=3D[value][/text][/showif][/FormVariables= ]=C2=A0[hideif [TheFileNM]=3D][hideif [CPK]=3D][hideif [JPK]=3D][FormVariab= les][showif [name]^"thefile"][SQLExecute conn_ref=3DTheBlueBiller&result_va= r=3DUPLOAD_INS]INSERT INTO UPLOAD(FILE_ID, COMPANY_ID, CLIENT_ID, JOB_ID, N= AME, CONTENT, ROW_ADDED_DTTM)VALUES ('', '[LOGIN_COMPANY_ID]', '[CPK]', '[J= PK]', '[TheFileNM]', '[convertchars db=3Ddatabases/upload.db][value][/conve= rtchars]', '[date %Y-%m-%d %H:%M:%S]')[/SQLExecute][/showif][/FormVariables= ][/hideif][/hideif][/hideif]=C2=A0[!]=3D=3D=3D=3D=3D=3D=3D=3DUPLOAD.DB FILE= ------------[/!]FROM=C2=A0=C2=A0 TO'=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 \'"=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 \"\=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 \\%=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 \%=C2=A0From:= =C2=A0Stuart Tremain [mailto:webdna@idfk.com.au]=C2=A0 Sent:=C2=A0Monday, March 20, 2017 6:43 PM To:=C2=A0WebDNA Talk List Subject:=C2=A0Re: [WebDNA] Upload file to mysql=C2=A0Hi Brian=C2=A0I have n= ot done that, but providing your MySQL field is LONGBLOB all should work.= =C2=A0=C2=A0Also to be able to insert images that are bigger than 1MB you h= ave to increase the max_allowed_packed option in the server configuration f= ile.=C2=A0I use Navicat to write all my queries and then copy & paset the q= uery into my WebDNA doc. Navicat makes writing & debugging fast.=C2=A0Kind = regards=C2=A0Stuart TremainPharoah Lane SoftwareAUSTRALIAwebdna@idfk.com.au= =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0On 21 Mar 2017, at 07:55, Brian Boegershausen wrote:=C2=A0 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=C2=A0 Brian Boegershausen=C2=A0=C2=A0--------------------------------------------= ------------- This message is sent to you because you are subscribed to the= mailing list . To unsubscribe, E-mail to: archives:=C2=A0http://mail.webdn= a.us/list/talk@webdna.us=C2=A0Bug Reporting:=C2=A0support@webdna.us=C2=A0= =C2=A0Virus-free.=C2=A0www.avg.com-----------------------------------------= ---------------- This message is sent to you because you are subscribed to = the mailing list . To unsubscribe, E-mail to: archives:=C2=A0http://mail.we= bdna.us/list/talk@webdna.us=C2=A0Bug Reporting:=C2=A0support@webdna.us-----= ---------------------------------------------------- This message is sent t= o you because you are subscribed to the mailing list=C2=A0. To unsubscribe,= E-mail to:=C2=A0archives:=C2=A0http://mail.webdna.us/list/talk@webdna.us= =C2=A0Bug Reporting:=C2=A0support@webdna.us=C2=A0--------------------------= ------------------------------- This message is sent to you because you are= subscribed to the mailing list . To unsubscribe, E-mail to: archives:=C2= =A0http://mail.webdna.us/list/talk@webdna.us=C2=A0Bug Reporting:=C2=A0suppo= rt@webdna.us--------------------------------------------------------- This = message is sent to you because you are subscribed to the mailing list . To = unsubscribe, E-mail to: archives:=C2=A0http://mail.webdna.us/list/talk@webd= na.us=C2=A0Bug Reporting:=C2=A0support@webdna.us=C2=A0=C2=A0Virus-free.=C2= =A0www.avg.com--------------------------------------------------------- Thi= s message is sent to you because you are subscribed to the mailing list . T= o unsubscribe, E-mail to: archives:=C2=A0http://mail.webdna.us/list/talk@we= bdna.us=C2=A0Bug Reporting:=C2=A0support@webdna.us-------------------------= -------------------------------- This message is sent to you because you ar= e subscribed to the mailing list=C2=A0. To unsubscribe, E-mail to:=C2=A0arc= hives:=C2=A0http://mail.webdna.us/list/talk@webdna.us=C2=A0Bug Reporting:= =C2=A0support@webdna.us=C2=A0=C2=A0Virus-free.=C2=A0www.avg.com------------= --------------------------------------------- This message is sent to you b= ecause you are subscribed to the mailing list . To unsubscribe, E-mail to: = archives:=C2=A0http://mail.webdna.us/list/talk@webdna.us=C2=A0Bug Reporting= :=C2=A0support@webdna.us---------------------------------------------------= ------ This message is sent to you because you are subscribed to the mailin= g list=C2=A0. To unsubscribe, E-mail to:=C2=A0archives:=C2=A0http://mail.we= bdna.us/list/talk@webdna.us=C2=A0Bug Reporting:=C2=A0support@webdna.us --------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to:=20 archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us ------=_Part_8836_1840953663.1490064689602 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable

You think i should [url]ize the str= ing?
Then i can look for %0A and things like that.

Brian Boegershausen





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

I t= hink that is where your problem lies.

<= div class=3D"">https://dev.mysql.com/doc/refman/5.7/en/string-lite= rals.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 &n= bsp; A tab character.
\Z   ASCII 26 (Control-Z).&= nbsp;
\\   A backslash (=E2=80=9C\=E2=80=9D) char= acter.
\%   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
 
 =
&nbs= p;
<= span style=3D"font-size: 11pt; font-family: Calibri, sans-serif;" class=3D"= ">From: Stu= art Tremain [mailto:webdna@idfk.com.au] 
= Sent: Monday, March 2= 0, 2017 9:45 PM
To: WebDNA Talk List <talk= @webdna.us>
Subject: Re: [WebDNA] Upload file to mysql
 
That is a = problem with a character causing MySQL to fail.
=
 
Looking at y= our conversion db it looks like you have covered everything except for ; (s= emicolon)
 
There may be something else as well.
=  
Kind regards
 
Stuart Tremain
Pharoah Lane Software
AUSTRALIA
<= span style=3D"font-size: 9pt; font-family: Helvetica, sans-serif;" class=3D= ""> 
 
 

=  

&nbs= p;
On 21 Mar 2017, at 12:16, <br= ian@endeavotech.com> <brian@endeavo= tech.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 synt= ax to use near ''\%PDF-1.5 \%=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD&= nbsp;1= 0 obj <
 
 
<= span style=3D"font-size: 11pt; font-family: Calibri, sans-serif;" class=3D"= ">When I look in the errorlog.txt file, the =EF=BF=BD characters <= /span>are the following symbols.
=C3=A2=C3=A3=C3=8F=C3= =93
 
 <= /o:p>
From:&nbs= p;Stuart Tremain [mailto:webdna@idfk.com.au] 
Se= nt: Monday, March 20,= 2017 9:03 PM
To: WebDNA Talk List <talk@webdna.us>
Subject: = ;Re: [WebDNA] Upload file to mysql
 <= o:p class=3D"">
What is the error ?
 
= Kind regards
=
 
Stuart Tremain
Pharoah Lane Software
=
AUSTRA= LIA
webdna@idfk.com.au<= o:p class=3D"">
 
<= /div>
 = ;
 

 

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

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 yo= u mean that WebDNA stalls or do you get a MySQL error message ?
 
 
Kind regards
&n= bsp;
Stuart Tremain
Pharoah Lane Software
AUSTRALIA
=
 
 
 

 

 
On 21 Mar 2017, at 11:15, <brian@e= ndeavotech.com> <brian@endeavotech.com> wrote:<= o:p class=3D"">
 
Hi Stewart,
I have my content field set to MEDIUM= BLOB which allows for 16mb max files.
<= span style=3D"font-size: 11pt; font-family: Calibri, sans-serif;" class=3D"= ">So far, I am using files around 100kb, so I am not reaching the max yet.<= /span>
 <= /div>
My query writes all the data fields and uploads .txt files, but o= nce I change to a file like a PDF, it chokes.<= /div>
 
[showif [referer]= ^file_manager.dna]
[showif [name]^filename]
        =         [text show=3DF]TheFileNM=3D[Midd= le StartAfter=3Dfilename=3D"&EndBefore=3D"][name][/middle][/text]
[/showif]
[showif [name]^CPK]
=
 &= nbsp;           &nbs= p;  [text show=3DF]CPK=3D[value][/text]
[/showif]
[showif [name]^JP= K]
     &nb= sp;          [text show=3DF]JP= K=3D[value][/text]
[/showif]<= o:p class=3D"">
[/FormVariables]
 
[hideif [TheFile= NM]=3D]
<= span style=3D"font-size: 11pt; font-family: Calibri, sans-serif;" class=3D"= ">[hideif [CPK]=3D]
[hideif [JPK]=3D]
[showif [name]^"thefile"]
<= div class=3D"">
[SQLExecute conn_ref=3DT= heBlueBiller&result_var=3DUPLOAD_INS]
INSERT INTO UPLOAD=
(FILE_ID, COMPANY_ID, CLIENT_I= D, 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=3DUPLOAD.DB FILE------------[/!]
<= /div>
FROM   TO
' &= nbsp;           &nbs= p; \'
"     = ;         \"=
\         &nb= sp;    \\
% &nbs= p;          \%
 
= From:&= nbsp;Stuart Tremain [mailto:webdna@idfk.com.au] 
S= ent: Monday, March 20= , 2017 6:43 PM
To: WebDNA Talk List <talk@webdna.us
>
Subject: = ;Re: [WebDNA] Upload file to mysql
 
Hi Brian=
 <= /o:p>
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 t= o increase the max_allowed_packed option in the server configuration file.<= o:p class=3D"">
 
I use Navicat to write all my queries and= then copy & paset the query into my WebDNA doc. Navicat makes writing = & debugging fast.
&n= bsp;
Kind regards
 
<= /div>
Stuart Tremain
Pharoah Lane Software
= AUSTRALIA
 
 
<= /div>
 

 

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

Anyo= ne successfully upload a file to a mysql db?
I can upload a t= ext 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-mai= l to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us
 
=
 
<= div class=3D"">
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:&nb= sp;http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us
= --------------------------------------------------------- This messag= e 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 y= ou because you are subscribed to the mailing list . To unsubscribe, E-mail = to: archives: h= ttp://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 unsubscrib= e, E-mail to: archives: <= a href=3D"http://mail.webdna.us/list/talk@webdna.us" style=3D"color: purple= ; text-decoration: underline;" class=3D"">http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us
 
 
Virus-free. www.a= vg.com
-----------------= ---------------------------------------- This message is sent to you becaus= e you are subscribed to the mailing list . To unsubscribe, E-mail to: archi= ves: http://mai= l.webdna.us/list/talk@webdna.us Bug Reporting: = ;support@webdna.us
------------------------------------------------= --------- This message is sent to you because you are subscribed to the mai= ling list . To uns= ubscribe, E-mail to: arch= ives: http://ma= il.webdna.us/list/talk@webdna.us Bug Reporting:&nbs= p;support@webdna.us
 
=
 
Virus-free. www.avg.com
------------= --------------------------------------------- This message is sent to you b= ecause you are subscribed to the mailing list . To unsubscribe, E-mail to: = archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@w= ebdna.us
-------------------------------------------= -------------- This message is sent to you because you are subscribed to th= e 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 ------=_Part_8836_1840953663.1490064689602-- . Brian Boegershausen

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:

showif and cart (1998) Text data with spaces in them... (1997) [WebDNA] Send results to more pages? (2011) Looking for 5 to 12 shops with 3 URLs & statements (1997) webcatalog [date] bug...not (1999) Re2: AAgghh!! Help, please. SSL strikes again. (1997) Modulo function? (2000) WebCatalog for guestbook ? (1997) range searching (1998) pretty Urgent: Crash after addlineitem (2001) Sku numbers (1997) TeaRoom Order fields email account remain empty even though thewy are filled. (1997) Wanted: More Math Functions (or, Can You Solve This?) (1997) Multiple security dbs (1997) Sort Order on a page search (1997) Mac: LModelDirector bug fix (1997) Test --> Ignore (2005) [SHOWIF AND/OR] (1997) Speed/performance issues using .hdr (1997) Simple counter - how? (1997)