PrepLogic book by Gunderloy

mcad

    Sponsored Links

    Next

  • 1. Books on discount?
    Why are the book in such a huge discount? Are they being discontinued?
  • 2. 70-310 exam for MCAD
    Well, after months of trying to decide if it's still worth trying to finish my MCAD for the old .Net, I've decided to just get the bloody thing and worry about it afterwards. Has anyone actually done the 70-310 exam recently ? If so, have they changed the format of the exam much. I bought a study book for the 70-310 exam a year ago so I hope it's still relevant. The book is by Mike Gunderloy. I've done the 70-305 and 70-229 already.

PrepLogic book by Gunderloy

Postby slinky » Tue, 14 Aug 2007 23:55:31 GMT

Just a question on a 70-310 lab. This is a longshot if anyone is using
this book. I'm studying 70-305 currently but I'm looking at an old lab
on page 912 of the 70-310 book which is a lab about adding data to a
database through an .aspx form with textboxes and a submit button.
Just wondering if anyone was familiar with this one. Several things
are stumping me on this one.   Thanks!


Re: PrepLogic book by Gunderloy

Postby Cerebrus » Wed, 15 Aug 2007 01:17:05 GMT



I have that book. What problems do you have ? Tell me the lab no.
(Step by step no. xx)


Re: PrepLogic book by Gunderloy

Postby slinky » Wed, 15 Aug 2007 02:06:48 GMT

tep-ByStep # A-12 on pp912-913
To make it simple I just have one textbox associated with a database
(Assets) with just one column (Assets992).

Imports System.Data
Imports System.Data.OleDb
Public Class Default5
Inherits System.Web.UI.Page
Private Sub Page_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
Dim cnn As OleDbConnection = _
New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
Server.MapPath("Assets.mdb") & "Initial Catalog=Assets992;Integrated
Security=SSPI")
Dim ds As DataSet = New DataSet()
Dim da As OleDbDataAdapter = New OleDbDataAdapter()
Dim cmdSelect As OleDbCommand = _
cnn.CreateCommand()
cmdSelect.CommandType = CommandType.Text
cmdSelect.CommandText = _
"SELECT AssetNumber FROM Assets992"
Dim cmdInsert As OleDbCommand = _
cnn.CreateCommand()
cmdInsert.CommandType = CommandType.Text
cmdInsert.CommandText = _
"INSERT INTO Assets992 AssetNumber VALUES(@AssetNumber)"
cmdInsert.Parameters.Add("@AssetNumber", OleDbType.WChar, 10,
"AssetNumber")
Dim SourceVersion As DataRowVersion
SourceVersion = DataRowVersion.Original
da.SelectCommand = cmdSelect
da.InsertCommand = cmdInsert
da.Fill(ds, "Assets992")
End Sub

Private Sub btnAdd_Click( _
ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles btnAdd.Click
Dim cnn As OleDbConnection = _
New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
Server.MapPath("Assets.mdb") & "Initial Catalog=Assets992;Integrated
Security=SSPI")
Dim ds As DataSet = New DataSet()
Dim da As OleDbDataAdapter = New OleDbDataAdapter()
Dim dr As DataRow = ds.Tables("Assets992").NewRow()
dr(0) = txtAssetNumber.Text
ds.Tables("Assets992").Rows.Add(dr)
da.Update(ds, "Assets")
End Sub
End Class

Keep gettinmg this:

Server Error in '/' Application.
--------------------------------------------------------------------------------

Multiple-step OLE DB operation generated errors. Check each OLE DB
status value, if available. No work was done.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.

Exception Details: System.Data.OleDb.OleDbException: Multiple-step OLE
DB operation generated errors. Check each OLE DB status value, if
available. No work was done.

Source Error:


Line 24: da.SelectCommand = cmdSelect
Line 25: da.InsertCommand = cmdInsert
Line 26: da.Fill(ds, "Assets992")
Line 27: End Sub
Line 28: Private Sub btnAdd_Click( _


Source File: E:\kunden\homepages\26\d190091667\Default5.aspx.vb
Line: 26

Stack Trace:


[OleDbException (0x80040e21): Multiple-step OLE DB operation generated
errors. Check each OLE DB status value, if available. No work was
done.]

System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString
constr, DataSourceWrapper& datasrcWrapper) +209

System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString
constr, OleDbConnection connection) +118

System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions
options, Object poolGroupProviderInfo, DbConnectionPool pool,
Db

Re: PrepLogic book by Gunderloy

Postby Ym91bmNlZ3V5 » Wed, 19 Sep 2007 23:56:04 GMT

hat error normally indicates that a value is too large to be written to a
field in a database.

"slinky" wrote:



Return to mcad

 

Who is online

Users browsing this forum: No registered users and 60 guest