• Post Reply Bookmark Topic Watch Topic
  • New Topic

can't able to create table for storing image in Mysql using jdbc  RSS feed

 
vinoth vino
Ranch Hand
Posts: 67
Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Helo, I m confused to create table for storing images in database(mysql) what's the exact syntax for it ? I've tried alot of method but none of those didn't work... Please help me out.

For ex:



or



Both are not working.......

But if i create table without anyquotes it works but in all sites they are using single or double quotes for storing images in database..... Is there any rules followed for creating images in sql ?
error.png
[Thumbnail for error.png]
 
K. Tsang
Bartender
Posts: 3648
16
Firefox Browser Java Mac OS X
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The quote for mysql is the ` (the one with the ~) not ', a bit different.

 
vinoth vino
Ranch Hand
Posts: 67
Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you..... Again I've one doubt this doesn't work....
error.png
[Thumbnail for error.png]
 
Campbell Ritchie
Marshal
Posts: 56576
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What datatype is NUMBER?
 
Rob Spoor
Sheriff
Posts: 21135
87
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Isn't NUMBER an Oracle datatype, itself replaced by NUMBER2?
 
vinoth vino
Ranch Hand
Posts: 67
Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I m using Mysql so what datatype should i want to use for storing number ? Is "NUMBER" and "CLOB" Datatype is not available in Mysql ?
 
Rob Spoor
Sheriff
Posts: 21135
87
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
https://dev.mysql.com/doc/refman/5.0/en/data-types.html

In this case, use (depending on the size) INT or BIGINT, and TEXT or LONGTEXT.
 
Campbell Ritchie
Marshal
Posts: 56576
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you still use VARCHAR(123) or CHAR(123) for Strings?
You would only use a CLOB for something very long.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!