I guess this link should help you with it :
http://www.javadb.com/connect-to-a-database-and-read-from-table

2010/8/27 Nguyễn Đình Đoàn <nguyendinhd...@gmail.com>

> Hi friends,
>
> I developed an application in .NET, I needn't open SQL Server Management
> Studio and then add my .mdf file!
> I need create a string connection only and then execute. This is my
> connect() method I used for my project in VB.net:
>
>  // I use express edition
>
>  Public Shared Sub connect()
>          strSqlConn = "Data
> Source=.\sqlexpress;AttachDbFileName=C:\MayAnh.mdf;Integrated Security=true;
> Connect Timeout=30;User Instance=True"
>          conn = New SqlConnection
>          conn.ConnectionString = strSqlConn
>          conn.Open() 'mở kết nối
>  End Sub
>
> In Java, I must open sql server configuration Manager and find the port,
> open ide then add database....
> So, I want to ask, I have .mdf file and how to connect to database like the
> code above but in Java ?
> Thanks !
>
> --
> You received this message because you are subscribed to the Google
> Groups "Java EE (J2EE) Programming with Passion!" group.
> To post to this group, send email to
> java-ee-j2ee-programming-with-passion@googlegroups.com
> To unsubscribe from this group, send email to
> java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com<java-ee-j2ee-programming-with-passion%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
>
> http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en?hl=en




-- 
Mansee Mongia

-- 
You received this message because you are subscribed to the Google
Groups "Java EE (J2EE) Programming with Passion!" group.
To post to this group, send email to
java-ee-j2ee-programming-with-passion@googlegroups.com
To unsubscribe from this group, send email to
java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en?hl=en

Reply via email to