Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Computer Certification > MCAD > PrepLogic book by Gunderloy

Reply
Thread Tools

PrepLogic book by Gunderloy

 
 
slinky
Guest
Posts: n/a
 
      08-13-2007
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!

 
Reply With Quote
 
 
 
 
Cerebrus
Guest
Posts: n/a
 
      08-13-2007
On Aug 13, 7:55 pm, slinky <(E-Mail Removed)> wrote:
> 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!


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

 
Reply With Quote
 
 
 
 
slinky
Guest
Posts: n/a
 
      08-13-2007
Step-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.GetDataSour ce(OleDbConnectionString
constr, DataSourceWrapper& datasrcWrapper) +209

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

System.Data.OleDb.OleDbConnectionFactory.CreateCon nection(DbConnectionOptions
options, Object poolGroupProviderInfo, DbConnectionPool pool,
DbConnection owningObject) +53

System.Data.ProviderBase.DbConnectionFactory.Creat eNonPooledConnection(DbConnection
owningConnection, DbConnectionPoolGroup poolGroup) +27

System.Data.ProviderBase.DbConnectionFactory.GetCo nnection(DbConnection
owningConnection) +47

System.Data.ProviderBase.DbConnectionClosed.OpenCo nnection(DbConnection
outerConnection, DbConnectionFactory connectionFactory) +105
System.Data.OleDb.OleDbConnection.Open() +37
System.Data.Common.DbDataAdapter.FillInternal(Data Set dataset,
DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String
srcTable, IDbCommand command, CommandBehavior behavior) +121
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior) +137
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String
srcTable) +83
Default5.Page_Load(Object sender, EventArgs e) in E:\kunden
\homepages\26\d190091667\Default5.aspx.vb:26
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+1061




On Aug 13, 12:17 pm, Cerebrus <(E-Mail Removed)> wrote:
> On Aug 13, 7:55 pm, slinky <(E-Mail Removed)> wrote:
>
> > 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!

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



 
Reply With Quote
 
bounceguy
Guest
Posts: n/a
 
      09-18-2007
That error normally indicates that a value is too large to be written to a
field in a database.

"slinky" wrote:

> Step-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.GetDataSour ce(OleDbConnectionString
> constr, DataSourceWrapper& datasrcWrapper) +209
>
> System.Data.OleDb.OleDbConnectionInternal..ctor(Ol eDbConnectionString
> constr, OleDbConnection connection) +118
>
> System.Data.OleDb.OleDbConnectionFactory.CreateCon nection(DbConnectionOptions
> options, Object poolGroupProviderInfo, DbConnectionPool pool,
> DbConnection owningObject) +53
>
> System.Data.ProviderBase.DbConnectionFactory.Creat eNonPooledConnection(DbConnection
> owningConnection, DbConnectionPoolGroup poolGroup) +27
>
> System.Data.ProviderBase.DbConnectionFactory.GetCo nnection(DbConnection
> owningConnection) +47
>
> System.Data.ProviderBase.DbConnectionClosed.OpenCo nnection(DbConnection
> outerConnection, DbConnectionFactory connectionFactory) +105
> System.Data.OleDb.OleDbConnection.Open() +37
> System.Data.Common.DbDataAdapter.FillInternal(Data Set dataset,
> DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String
> srcTable, IDbCommand command, CommandBehavior behavior) +121
> System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32
> startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
> CommandBehavior behavior) +137
> System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String
> srcTable) +83
> Default5.Page_Load(Object sender, EventArgs e) in E:\kunden
> \homepages\26\d190091667\Default5.aspx.vb:26
> System.Web.UI.Control.OnLoad(EventArgs e) +99
> System.Web.UI.Control.LoadRecursive() +47
> System.Web.UI.Page.ProcessRequestMain(Boolean
> includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
> +1061
>
>
>
>
> On Aug 13, 12:17 pm, Cerebrus <(E-Mail Removed)> wrote:
> > On Aug 13, 7:55 pm, slinky <(E-Mail Removed)> wrote:
> >
> > > 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!

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

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mike Gunderloy book Que publisher Question Sean MCAD 2 11-14-2004 10:54 PM
Anyone tested preplogic CD in QUE examCram2 by Gunderloy(2003)? developingweb MCSD 0 10-30-2004 06:14 PM
preplogic test in QUE examCram by Gunderloy? developingweb MCSD 0 10-30-2004 05:23 PM
MCAD VB track recommended book Reisman or Gunderloy jat MCAD 3 05-22-2004 10:22 PM
70-305 Gunderloy book prob Gary MCSD 1 02-23-2004 09:36 PM



Advertisments