Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

70-315 practice exam 2

Status
Not open for further replies.

Eli20

Programmer
Oct 30, 2003
119
0
0
MX
hi, im preparing for taking the 70-315 exam, to get the MCSD certification, i just finished reading the Kalani´s book, and i think its very good and complete, but now im looking on the web for some practice exams, so i can know if im really prepared for the real one, does anybody know where can i get some free ones?

thank you very much

Eli
 
Hi Eli,

Even I have the same question. I read the book completly but not confident enough to face the Exam. So can anyone help in getting the practice tests. I went to the Transcenders.com but I think they are charging quite a big amount. Looking forward for a good Suggestion

Thanks
Dess
 
I bought the Transcender exam at a book store after reading Kalani's book, and I think it really, really helped! Though expensive, I thought that the Transcender exam was worth it and it helped me pass the first time.

The practice test included in the book doesn't reflect the real test very well.
 
Hello,

Is there any one who are done with the 70-315 certification exam and willing to sell/share the Transcenders practise tests.

Thanks
Dess
 
Hi,
Can i ask you a question for 70-315?

Question is:
Your ASP.NET application enables customers to create new sales orders. The sales orders are stored in a Microsoft SQL Server database table named TestKingSales. The table has an IDENTITY column named OrderID. Your code uses a DataTable object to manage the order data. The DataTable object contains a column named OrderNumber. You use the Update method of a SqlDataAdapter object to call a stored procedure that inserts each new order into the database. The stored procedure uses a parameter to return the new OrderID value for each order. You assign a SqlCommand object to the InsertCommand property of the SqlDataAdapter object. You add a SqlParameter object to the Parameters collection of the SqlDataAdapter object, specifying the name and data type of the parameter. You need to set properties of the SqlParameter object to retrieve new OrderID values from the database into the OrderNumber column of your DataTable object. What should you do?
A. Set the Direction property to ParameterDirection.ReturnValue.
Set the SourceColumn property to “OrderID”.
B. Set the Direction property to ParameterDirection.ReturnValue.
Set the SourceColumn property to “OrderNumber”.
C. Set the Direction property to ParameterDirection.Output.
Set the SourceColumn property to “OrderID”.
D. Set the Direction property to ParameterDirection.Output.
Set the SourceColumn property to “OrderNumber”.

the answer is D, I choose C.

explain:
"The source column, where the value will be stored, is the OrderNumber column" I think should OrderID, which is comes from sql database

Thanks

Shuren
 
The SourceColumn doesn't necessarily have anything to do with the database names (and isn't known or payed attention to by the stored procedure).

Rather the SourceColumn is used by the SqlDataAdapter to map a return value (or update/insert value) to a DataSet or DataTable. Essentially, the SqlDataAdapter looks at the value stored in the "@OrderID" parameter, and stores it in the "OrderNumber" column in a DataRow of some DataTable.

In other words "@ParameterName" is used by the stored procedure, and SourceColumn is used by DataTables/DataAdapters.
 
C is correct. The SourceColumn is the name of the Column in the DataTable. You are using a stored procedure so you can not specify DataBase field names, only parameters to the stored procedure. SourceColumn specifies where the data is to be gotten or set in the DataTable. Think about it. There is nowhere else in the parameter can you specify the name of the coluimn in the DataTable.

From the Docs
SqlParameter.SourceColumn Property
Gets or sets the name of the source column that is mapped to the DataSet and used for loading or returning the Value.

Public Property SourceColumn As String Implements _
IDataParameter.SourceColumn

Forms/Controls Resizing/Tabbing
Compare Code
Generate Sort Class in VB
Check To MS)
 
I think I get the answer.

if parameter direction of stored procedure is input, SourceColumn is match the column of table in database.

if parameter direction of stored procedure is output, then SourceColumn should be match to the column of table in DataSet.

Shuren
 
BoulderBum said:
Though expensive, I thought that the Transcender exam was worth it and it helped me pass the first time
You might want to check out my faq on this.
faq468-4224
How to pass MS tests on the first try. Good luck.

Glen A. Johnson
If you're from Northern Illinois/Southern Wisconsin feel free to join the Tek-Tips in Chicago, Illinois Forum.
TTinChicago
Johnson Computers
 
if parameter direction of stored procedure is input, SourceColumn is match the column of table in database."
if parameter direction of stored procedure is output, then SourceColumn should be match to the column of table in DataSet."

No. The SourceColumn is the name of a column in a DataTable that cooresponds to a SqlParameter Value.
 
When SourceColumn is set to anything other than an empty string, the value of the parameter is retrieved from the column with the SourceColumn name. If Direction is set to Input, the value is taken from the DataSet. If Direction is set to Output, the value is taken from the data source. A Direction of InputOutput is a combination of both.


Shuren
 
shuren2

Check this then.


CREATE PROCEDURE InsertCategory
@CategoryName nchar(15),
@Identity int OUT
AS
INSERT INTO Categories (CategoryName) VALUES(@CategoryName)
SET @Identity = SCOPE_IDENTITY()
The InsertCategory stored procedure can then be specified as the source of the DataAdapter.InsertCommand. A parameter is created to receive the identity output parameter. That parameter has a Direction of ParameterDirection.Output, and has a SourceColumn specified as the CategoryID column of the local Categories table in the DataSet.When the InsertCommand is processed for an added row, the auto-incremented identity value is returned as this output parameter and is placed in the CategoryID column of the current row.



Forms/Controls Resizing/Tabbing
Compare Code
Generate Sort Class in VB
Check To MS)
 
If Direction is set to Input, the value is taken from the DataSet."

As in: from the DataSet to use for the parameter in the sproc.

"If Direction is set to Output, the value is taken from the data source."

As in: to put in the DataSet based on the output value assigned by the sproc.

I gave you the correct answer. You're going to get the question wrong on the test if you don't figure out how it works.

My recommendation is that you create a DataTable with column names that differ slightly from the database column names, then play with the various SqlDataAdapter commands.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top