
How do you use jpegs in a realbasic database on the PC
Steve,
I have QuickTime installed....
I have tried it again and the way I have it working it looks like if I try
many times to insert it into the database it works... It seems quite
intermittent so I cannot nail it down to code. I did notice that the specs
for 4.5.b3 it says that blobs are working in Windows now. Does this mean
that 4.02 has problems with blobs not written from Windows into the
database?
I got the code from the Jpegs in a Real Basic Database that is on the
realbasic.com website I recompiled this for Windows using 4.5b3 and it works
great on the PC. My application that I am writing is about 100 times more
complex and must be tweaked to work with 4.5 first before I try again.
Hopefully someone from RB will read this thread and give me some insight on
why there are bugs in the Windows Blob reading and writing in 4.02
Thanks
Eddie
Quote:
> I had to install QuickTime on the Windows machine when using
> FolderItem.Openaspicture.
> This might be the same for the database.
> Steve
> > Does anyone know how to use jpegs that are in a realbasic database on
the
> > PC. It works great on the Mac but not on the PC.
> > Here is the code I use for the Mac and it works.
> > dim db as database
> > dim f as folderItem
> > dim cur as databasecursor
> > dim i As integer
> > dim SQLstatement As string
> > f = getfolderItem("Company_logos")
> > if not f.exists then
> > beep
> > msgBox "The database file is missing."
> > else
> > db = openREALDatabase(f)
> > if db = nil then
> > beep
> > msgBox "The database file could not be opened."
> > else
> > for i = 0 to current_company_logos.listcount-1
> > if current_company_logos.selected(i) then
> > SQlstatement = "select * from logos where company_id = " +
> > current_company_logos.Cell(i,1)
> > //msgbox SQLstatement
> > cur = db.SQLSelect(sqlstatement)
> > end if
> > next
> > if cur = nil then
> > //beep
> > //msgBox "Error in select."
> > else
> > if cur.field("company_name").getString = "" then
> > //beep
> > //msgBox "No record found."
> > else
> > canvas2.backdrop = cur.field("logo").jPEGValue
> > end if
> > end if
> > end if
> > db.close
> > end if
> > This is working great under Mac OS X however not on windows.
> > Thanks