VB.net
Hy,
I am a new vb.net programmer,
I want to now how can establish a connection between my form and my database.
Web Development
Hy,
I am a new vb.net programmer,
I want to now how can establish a connection between my form and my database.
by rrv
Drag an sqlclient or sqloledb into your form. set the properties to connect to your database. drag a sqldataset into your form. These two you can find in the dataexplorer next to toolbox. set the datasource for the dataset the sqlclient. selectthe table or view in the data set. drag a flexgrid from toolbox into your form. set the datasource property to the dataset. set the grid design like the way you do in MS Word table. Just run the program.[No more interpreter. So compile and execute]. If you do the same in webform instead of windowsform and select ASP, the same thing works in IIS or web. And you are there with what you want.
All the best
RV
by rrv
dim con as sqlclient.sqlconnection("Data Source=server;Initial Catalog=catalog;Integrated Security=True")
dim cmd as sqlclient.sqlcommand("select * from table1",con)
dim ds as dataset
cmd.fill(ds,"table1")
FGrid.datasource=ds
This discussion is closed to new replies.
Sort by Trending