This week's book giveaway is in the Features new in Java 9 forum.
We're giving away four copies of Java 9 Revealed and have Kishori Sharan on-line!
See this thread for details.
Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • 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: 3639
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
Sheriff
Posts: 54030
130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What datatype is NUMBER?
 
Rob Spoor
Sheriff
Posts: 20940
81
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: 20940
81
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
Sheriff
Posts: 54030
130
  • 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!