Link SQL table with Java/VB [message #10084] |
Fri, 02 January 2004 04:24 |
Mubasher
Messages: 4 Registered: December 2003
|
Junior Member |
|
|
I want to link SQL table with VB or Java but the table did not view at all using DSN Name (ODBC) or (JDBC) like Access file (we find in anywhere). What is the procedure to link the table and also mentioned that what is the procedure to view the table like access
Thanks
|
|
|
Re: Link SQL table with Java/VB [message #10941 is a reply to message #10084] |
Wed, 25 February 2004 03:25 |
Avinash barnwal
Messages: 1 Registered: February 2004
|
Junior Member |
|
|
an Sql table can be linked with VB using Activex Data Objects(ADO) 2.x Library
you have to set connectionstring property of the connection Object to the following: -
"Provider=SQLOLEDB;Data Source=<ServerName>;" & _
"Initial Catalog=<DatabaseName>;UID=<username>"
then call method Open of Connection Object
next You have to open the Recordset using a sql source and ActiveConnection set to the Connection opened above.
and you have the sql query results in the Recordset Object Accesible via the Fields collection of the Recordset Object
|
|
|