List:MySQL and .NET« Previous MessageNext Message »
From:Reggie Burnett Date:December 27 2004 4:02pm
Subject:RE: blob
View as plain text  
Jorge

With the new connector  you need to start your parameters with ? instead of
@.  If you have a lot of old code that uses @, then you can turn on the old
behavior by adding "old syntax=yes" to your connect string.

-reggie

> -----Original Message-----
> From: Jorge Bastos [mailto:mysql.jorge@stripped]
> Sent: Thursday, December 23, 2004 8:29 AM
> To: dotnet@stripped
> Subject: Re: blob
> 
> Thanks
> 
> I searched my mailling list emails for "blob" and found nothing.
> I remember seeing this email.
> Thanks
> 
> Jorge
> 
> 
> 
> ----- Original Message -----
> From: "Clemens Schotte" <clemens@stripped>
> To: "'Jorge Bastos'" <mysql.jorge@stripped>
> Sent: Thursday, December 23, 2004 2:27 PM
> Subject: RE: blob
> 
> 
> >
> > Hallo Reggie,
> >
> > Your syntax of the MySqlParameter must change into:
> > MyCmd.Parameters.Add(New MySqlParameter("?buffer", buffer))
> >
> > And in the query string you must change the @buffer into ?buffer
> >
> > Or you can add to the connection string OldSyntax=true if you want to
> use
> > the @ in your query. This is for compatibility only. All future code
> > should
> > be written to use the new '?' parameter marker.
> >
> > Clemens Schotte
> > NavaTron Corporation
> >
> > ----- Original Message -----
> > From: "Jorge Bastos" <mysql.jorge@stripped>
> > To: <dotnet@stripped>
> > Sent: Thursday, December 23, 2004 10:11 AM
> > Subject: blob
> >
> >
> > DecimalHi
> > Reggie,
> >
> > I have a little problem, when using the old 0.76 when i insert values in
> a
> > blob field it was ok, now when i changed to 1.0.3 isn't working.
> > Perhaps the code need something to be ajusted?
> > I'll show below how i was inserting the images into the blob field.
> > The field gets empty with 1.0.3!
> > Can you give me a tip?
> >
> > The code:
> >
> > MyCon = New MySqlConnection("cs here")
> >
> > MyCon.Open()
> >
> > MyCmd = New MySqlCommand(sql, MyCon)
> >
> > sql = "insert into imagens values ('" + txtemp.Text + "','" + lg +
> > "',@buffer)"
> >
> > MyCmd.CommandText = sql
> >
> > MyCmd.Connection = MyCon
> >
> > MyCmd.Parameters.Add(New MySqlParameter("@buffer", buffer))
> >
> > MyCmd.ExecuteNonQuery()
> >
> > mycon.close
> >
> >
> 
> 
> --
> MySQL on .NET Mailing List
> For list archives: http://lists.mysql.com/dotnet
> To unsubscribe:    http://lists.mysql.com/dotnet?unsub=1

Thread
blobJorge Bastos23 Dec
  • Re: blobJorge Bastos23 Dec
Re: blobJorge Bastos23 Dec
  • RE: blobReggie Burnett27 Dec