CCCCCCC C C CC: C C C C
CCCCCCC C C CC: C C C C
CCCCCCC C C CC: C C C C
Net
Q1. Explain the working of CommandBuilder object by using DataAdapter
object in ADO.Net?
Ans: The Command object can execute SQL queries and stored procedures. SQL queries are
executed to return data in a DataSet or a DataReader object. SELECT, INSERT, UPDATE,
and DELETE SQL queries are used to to retrieve add, update and delete. A DataAdapter
generated using the VS .NET Integrated development Environment (IDE) has these queries.
Step 1-:
Step 2-:
The Data Adapter object serves as a conduit between the data source and the
Dataset. The Data Adapter knows about the DataSet and it knows how to populate it.
The Adapter also knows about the connection to the data source. Figure 4 is a model
that shows the simple relationship between the Data Adapter and the data source.
Q2. Differentiate between Dataset and Datareader?
Q3. Write a Vb.Net program code to insert a TextBox value into Sql
database?
Ans: The code to insert a text box value into sql database is as:
Q4. Briefly describe the crystal reports? Explain the mechanism to connect
crystal report using Vb.Net?
Ans: Crystal Reports are a business intelligence application used to design and generate
reports from a wide range of data sources. Several other applications, such as Microsoft
Visual Studio, bundle an OEM version of Crystal Reports as a general purpose reporting tool.
Crystal Reports became the de facto standard report writer when Microsoft released it with
Visual Studio.
Report designer
Crystal Reports allows users to graphically design data connections and report layout. In the
Database Expert, users can select and link tables from a wide variety of data sources,
including Microsoft Excel spreadsheets, Oracle databases, Business Objects Enterprise
business views, and local file system information
Crystal Reports comes integrated with Visual Studio. Crystal Reports allows Java developers
to build applications with Crystal Reports components.
Q5. Discuss the different ways to store and retrieve images in SQL server database
through Vb.Net?
Ans:
Function SaveImage _
(ByVal FileName As String) As Integer
' Create a FileInfo instance
' to retrieve the files information
Dim fi As New FileInfo(FileName)
With cmd.Parameters
.Add("@FileName", VarChar, 100).Value = _
fi.Name
.Add("@FileType", VarChar, 10).Value = +
fi.Extension
.Add("@Image", Image).Value = imgData
.Add("@FileSize", Int, 4).Value = fi.Length
End With
cn.Open()
cmd.ExecuteNonQuery()
cn.Close()
cn.Dispose()
End Function
The image field in SQL Server is simply a byte array. Here is the significant code you will
need. Let's assume the name of your image field in the database is "imageField". Hope this
helps.
Q6. Is it possible to send and retrieve XML files on server using HTTP protocol? If so,
brief the programmatic steps to send and retrieve XML files?
Ans: