Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners vedio into sqlserver
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


raja sekhar reddy
vedio into sqlserver
2 Answer(s)      2 years and 9 months ago
Posted in : Java Beginners


i want to insert a mp4 vedio into sqlserver can any one help me


Advertisement
View Answers

February 14, 2012 at 4:34 PM


import java.sql.*;
import java.io.*;
class InsertVideo {
public static void main(String[] args) throws SQLException {
try {
Class.forName("com.mysql.jdbc.Driver").newInstance();
Connection connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/test", "root", "root");
File file = new File("c:/new.mp4");
PreparedStatement psmnt = connection.prepareStatement("insert into myfile(name, file) "+ "values(?,?)");
psmnt.setString(1,file.getName());
FileInputStream fis = new FileInputStream(file);
psmnt.setBinaryStream(2, (InputStream)fis, (int)(file.length()));
int s = psmnt.executeUpdate();
System.out.println("Inserted Successfully");
connection.close();
psmnt.close();
}
catch (Exception ex) {
System.out.println("Found some error : "+ex);
}
}
}


February 15, 2012 at 10:05 AM


thank u so much



Related Tutorials/Questions & Answers:
vedio file saving - SQL
vedio file saving  in my university project i am developing a advertisement site.here i have decided to give my customers to show their adds as vedio... vedios in database. I want to use vedio streaming here.but i dont know anuthing
ms sqlserver
ms sqlserver  hii, i m getting trouble in restoring a database file in MS SQLServer 2000 . all i have is signature.bkp , query.sql, signaturebackup.bkp files... please guide me how i restore these backup files in new database
Advertisements
recording mp4 vedio using j2me - Java Beginners
recording mp4 vedio using j2me  HELLO i can now play mp4 video using j2me but the problem i ame facing how i can record mp4 vedio using j2me could you help me? thanks a lot   
jsp with sqlserver - JDBC
jsp with sqlserver  Hi everybody, I want to store and retrive images in sqlserver from jsp program. can anybody suggest me the code for that.Actually my need s to store lot and lot of images in database.  Hi
Convert sqlserver database to msexcel
Convert sqlserver database to msexcel  How to i convert sqlserver database values into msexcel sheet using java...   We have used MySQL database. import java.io.*; import java.sql.*; import
Store XML file into Sqlserver Database
Store XML file into Sqlserver Database  Code for storing a typical XML file into SQl server database in 1 or more tables using asp.net using C
Store XML file into Sqlserver Database
Store XML file into Sqlserver Database  Code for storing a typical XML file into SQl server database in 1 or more tables using asp.net using C#. <?xml version="1.0" ?> <!DOCTYPE PubmedArticleSet (View Source
Regarding connection between sqlserver 2005 and android application
Regarding connection between sqlserver 2005 and android application  hi to all, i want to know how to create webservice to connect sqlserver 2005 and android. can you please help me by providing source code for ref.. thanks
How to create a data base connectivity using sqlserver or Mydql through J2ME - JDBC
How to create a data base connectivity using sqlserver or Mydql through J2ME   hi , iam new to J2ME,i want to know, How to create a data base connectivity using sqlserver through J2ME. Currently we are working
Sending form data from HTML page to SQLserver 2005 database by calling servlet code
Sending form data from HTML page to SQLserver 2005 database by calling servlet code  Hi sir, I would like to know how to send the form data from html page to database by calling servlet code from html page .   
RAJ9992
vedio into sqlserver  i want to insert a mp4 vedio into sqlserver can any one help me   import java.sql.*; import java.io.*; class InsertVideo { public static void main(String[] args) throws SQLException { try
JDBC
JDBC  in class.forname which driver name we are writing for the connection from jdbc to sqlserver 2008
Connecting jboss with sql 2005 - Struts
Connecting jboss with sql 2005  Hai, i have project that was developed in struts,backed is sqlserver 2005 and and i am using jboss. I want to connect another database (sqlserver 2005) with my project.could u please help me
dvd rental system - Java Beginners
record of a customer, and a vedio in the video shop. and save this to a cvs file
Database backup
Database backup  I am developing c# application in which i am using Microsoft Access database (OLEdb connections). I want to take backup of database programaticaly. Or as i can tae it in sqlserver 2008 r2(.bak) file. How can i
online database connectivity issue from JSP page .
= DriverManager.getConnection("jdbc:sqlserver://localhost:1433;"+"databaseName...("com.microsoft.sqlserver.jdbc.SQLServerDriver"); conn = DriverManager.getConnection("jdbc:sqlserver
online database connectivity issue from JSP page .
= DriverManager.getConnection("jdbc:sqlserver://localhost:1433;"+"databaseName=dorakoina...("com.microsoft.sqlserver.jdbc.SQLServerDriver"); conn = DriverManager.getConnection("jdbc:sqlserver
online database connectivity issue from JSP page .
= DriverManager.getConnection("jdbc:sqlserver://localhost:1433;"+"databaseName=dorakoina...("com.microsoft.sqlserver.jdbc.SQLServerDriver"); conn = DriverManager.getConnection("jdbc:sqlserver
project
project   hi , we r working on one project related to our results. we using java and for back end sqlserver 2005. In dis we are trying to retrieve result from some site and store it in our data base so that we can perform
Upload and Download multiple files
using jsp with sqlserver ,can you please provide a proper coding for it and also
error : not an sql expression statement
error : not an sql expression statement  hii I am gettin followin error in connecting to database SQLserver 2005 in Jdeveloper,i m usin struts and jsp my pogram: import java.sql.*; public class TaskBO { public TaskBO
Swings - JDBC
Swings  Hi..Sir...I am begginer in Netbeans... How to retrieve the databases from sqlserver to Jtable in Netbeans... In my form..i have three fields like..Number,Name,PhoneNo(3 Labels & 3 textfields),(Save)1 button & Jtable
how to create a databaseconnectvity using SQLSERVER2005 in J2ME - JDBC
how to create a databaseconnectvity using SQLSERVER2005 in J2ME  hi , iam new to J2ME,i want to know, How to create a data base connectivity using sqlserver through J2ME. Currently we are working on a Mobile Applicayion
java cade - JDBC
= DriverManager.getConnection("jdbc:microsoft:sqlserver://localhost:8080;DatabaseName
Connections with MicroSoft SQL - JDBC
:microsoft:sqlserver://localhost:3042/"; String db = "MyDataBase
Hibernate 3.1.1 Released
gives imcomprehensible error message ANSI-SQL trim function for SQLServer ANSI-SQL mod function for SQLServer ANSI-SQL bit_length function for SQLServer
Cmp Bean - EJB
connection = DriverManager.getConnection("jdbc:microsoft:sqlserver://:1433",<
jboss with local entity bean - Development process
for database MS SQLSERVER 2005 which is working fine. we migrated the application from
To render imageicon to image component - Java Server Faces Questions
connectionUrl = "jdbc:sqlserver://rnd:1433;" + "databaseName=mtech
Servlet problem
= 0; /* String url= "jdbc:jtds:sqlserver://db205.my-hosting-panel.com...";*/ try { //String url= //"jdbc:sqlserver://204.93.178.157
 

 

 

DMCA.com