VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Saving Data, Retrieving data, Using Datasets, Data Adapters, Data Reader, Data Command Object, Usin

Bharathi Krishna  (1 Submission)   Miscellaneous   VB 6.0   Unknown Difficulty   Sun 4th January 2004   Mon 8th February 2021

Saving Data, Retrieving data, Using Datasets, Data Adapters, Data Reader, Data Command Object, Using Stored Procedures, Using Triggers, Using

API Declarations



Preparation:

Design a form using .NET environment and place two textbox controls on a form.
Design and create a table using SQL Server 2000.

Name the Database as FinAccounting.
Name the Table as AccountsTable.
Name the form as Form1
Name the controls on the form as Textbox1 and Textbox2.

Tasks:

1. Establish the connection with the Database using Connection object.
2. Execute the command.
3. The data will be read by the Datareader object and the contents of the first record is displayed in the textboxes.

Imports System.Data.SqlClient
Public Class Form1
Inherits System.Windows.Forms.Form
Dim str_sql_user_select As String = “SELECT * FROM AccountsTable”
Dim str_connection As String = “Data Source=VSDOTNET;Integrated Security=SSPI;Initial Catalog=FinAccounting”
Dim mycon As SqlConnection
Dim comUserSelect As SqlCommand
Dim myreader As SqlDataReader


Rate Saving Data, Retrieving data, Using Datasets, Data Adapters, Data Reader, Data Command Object, Usin (1(1 Vote))
Saving Data, Retrieving data, Using Datasets, Data Adapters, Data Reader, Data Command Object, Usin.bas

Saving Data, Retrieving data, Using Datasets, Data Adapters, Data Reader, Data Command Object, Usin Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters