Access SQL Server from J#

Hi,

I'm triying to make a visual java project that includes a SQL server database and I don't know how. It's the first time I do that.

I have made the SQL database, but I don't know how initiate the connection with it.

[227 byte] By [ferran] at [2008-2-19]
# 1
Hi,
If you are working on J#, then in visual studio there is "Data" menu in main menu bar (you can see it if you create a windows application). From this menu click on "Add new Data Source" to bring up the Data Source Configuration wizard. This wizard is self explanatory and you can easily create connection to SQL server/Acess database.

Once you are done with Connection creation, build your solution. It will add a new tab to ToolBox with the name "<your Project name> Components". Drag and drop these components on your form and use them.

Please post back if you face any other issue.

Thanks.

JaiprakashSharma at 2007-9-9 > top of Msdn Tech,Visual J#,Visual J# General...
# 2

Hi,
You may also like to refer this post. This post has got a working sample code also.
I would still suggest you to go use Data Configuration Wizard instead of writing the code yourself. Code in the recommended post has also been generated using the Data Source Configuration Wizard only.

Thanks.

JaiprakashSharma at 2007-9-9 > top of Msdn Tech,Visual J#,Visual J# General...
# 3
Thanks to all
ferran at 2007-9-9 > top of Msdn Tech,Visual J#,Visual J# General...