![]() |
|
Welcome to the Computer Webmaster Gaming Console Graphics Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
| |||||||
| Database Database problems or need to ask a question? maybe something to do with sql injections or a database software question. Database topics cover MySQL, PostgreSQL, Oracle, SQL Server or anything else related to databases. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 | ||
| J West wrote: > function TpfDCPurchaseOrder.Update: Boolean; > var > ms : TStream; > begin > Result := False; > ms := TMemoryStream.Create; > Query.Close; > Query.SQL.Clear; > Try > PurchasePicture.Picture.Bitmap.SaveToStream(ms); > Query.Parameters.CreateParameter('PurchasePicture' , ftBlob, pdInput, > SizeOf(PurchasePicture.Picture), > null); > Query.SQL.Add('UPDATE PurchaseOrder SET' + > ' SupplierID = ' + IntToStr(SupplierID) + > ', PurchaseDate = ' + > QuotedStr(FormatDateTime('YYYY/mm/dd', PurchaseDate)) + > ', PurchaseCost = ' + FloatToStr(PurchaseCost) + > ', PurchaseDescription = ' + > QuotedStr(PurchaseDescription) + > ', PurchaseEBayReference = ' + > QuotedStr(PurchaseEBayReference) + > ', PurchaseNotes = ' + QuotedStr(PurchaseNotes) + > ', PurchasePicture = urchasePicture' +> ' WHERE PurchaseOrderID = ' + IntToStr(ID)); > Query.Parameters.ParamByName('PurchasePicture').Lo adFromStream(ms, > ftBlob); > Query.ExecSQL; > Result := True; > Query.Close; > Query.Parameters.Clear; > Finally > ms.Free; > End; > end; > > My picture doesn't save but every other value does! > I'm using Delphi7 with MySQL 4.51 with ODBC and ADO > > Regards > > James West > > Hard to say without seeing the layout for your table but my guess is MySQL does not like the colon in "PurchasePicture = urchasePicture".Something doesn't look right with the way this is specified but just a guess........ Regards, Wendell Jones | |||
|
| Featured Websites | ||||
|
![]() |
| Tags: query, wrong |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Query on Shilling | Gareth Hardy | Ebay Technical Questions | 3 | 05-30-2007 1:18 AM |
| Query on Shilling | Bluehaven201 | Ebay Technical Questions | 19 | 05-30-2007 1:18 AM |
| another Paypal query | SuperLeeds | Ebay Technical Questions | 9 | 05-30-2007 12:40 AM |
| Insurance Query | AJORDAN | Ebay Technical Questions | 1 | 05-30-2007 12:31 AM |
| Featured Websites | ||||
|