From: Crash&Burn22 on
Hello everyone,
I have created a connection to an Access 2007 db with 6 tables in it useing
the ASP example (dbaction.ASP with some minor changes to it to get it to
connect to the db) from the Jennie Thornton book "Authorware 6 [inside
macromedia]".

dbaction.ASP at bottom of posting:

The first 3 tables are for login information for 3 different departments,
Management, Engineering and Security. These tables contain the following: ID,
passwordFirst, UFirstName, LastName, Title, Building and BookMark. When the
user signs in, this info is entered into the db. When the user completes a
section or chooses to end their session a bookmark "IconID(a)IconTitle" and
"number" are utilized and placed in the BookMark column. When the user
completes the training, "100" is placed in the Building column to indicate they
have completed the training and the bookmarks then get zeroed out. All this
works quite well.

The problem I am having is trying to connect to the other 3 tables which are
ManagementResults, EngineeringResults and SecurityResults. These tables contain
the following: ID (which is in a relationship with the ID from the other
table), TestDate, TestTime, QuestionsAsked, AnsweredCorrectly, Score,
LetterGrade, FinalQuestion and Building. When the user takes the test portion
of my program this information is supposed to be entered into the table, but
nothing gets entered into or updated in these tables.
I have read that the ADO.Net only works with a db with one table which it is
doing. Here is the clip I have read:

*** Microsoft ADO.NET ***
- DataAdapter

Provide:
- You use a DataAdapter to fill a DataSet with records. It could use embedded
Command components or it could be connected to your Command components.
- DataAdapter does not recognize master/detail relationships. You need to use
one DataAdapter for each table.

Resolve:
- It generates SQL statements on the fly using information from the SELECT
statement, but only for single tables.
- You must use one DataAdapter for each table so it updates only one table.
- It does not let you configure how SQL statement should be generated.
- It manages concurrency.

I also have 3 queries in place. These are ManagementResultsQuery,
EngineeringResultsQuery and SecurityResultsQuery. These contain the following
which are parts of the first 2 tables: ID, UFirstName, LastName, Title,
TestDate, TestTime, Score, LetterGrade, FinalQuestion and Building. When the
user completes the test they recieve this information printed out with every
subject or category they have covered. This is the portion that is not
working. I quess I need to implement a DataAdapter.

Finally, to my question.... Can you point me in the right direction or supply
a sample code of a DataAdapter written in the Authorware coding to fit my
program? I have found an example, but not sure what language it is written in
or just what parts to change to fit my program or even if using that code would
be permitted.
Link to example code.
http://www.codeproject.com/KB/database/relationaladonet.aspx

I do not have an autonumber as the example mentions.
Any help would be greatly appreciated. Many thanks in advance. Crash&Burn22

<%

Dim cConnectStr

Set DBConn = Server.CreateObject ("ADODB.Connection")

'cConnectStr="DSN=raymond2008EID DSN"

cConnectStr="Provider=Microsoft.Jet.OLEDB.4.0; Data Source="&
Server.MapPath("raymond2008EID.mdb") & ";Jet OLEDB:Database
Password=RAYMOND100;"

'cConnectStr="Provider=Microsoft.Jet.OLEDB.4.0; Data Source="&
Server.MapPath("raymond2008EID.mdb") &
";DB_ODBCuser=Admin;DB_ODBCpwd=RAYMOND100;"
'cConnectStr="Provider=Microsoft.Jet.OLEDB.4.0; Data Source="&
Server.MapPath("raymond2008EID.mdb") & DB_ODBCuser=admin &
DB_ODBCpwd=RAYMOND100") '& ";DB_ODBCpwd=RAYMOND100;"

DBConn.Open cConnectStr

strSql = Request.QueryString("sqlStatement")

Set oRS = DBConn.Execute(strSql)
strResult = ""
If oRS.State = 1 then
For Each oField in oRS.Fields
'strResult = strResult + oField.Name + ","
strResult = strResult + " "
Next
length = Len(strResult) - 1
strResult = Left(strResult, length)
strResult = strResult + vbNewLine
Do While Not oRS.EOF
For Each oField in oRS.Fields
'strResult = strResult + CStr(oField.Value) + ","
strResult = strResult + CStr(oField.Value) + " "
Next
length = Len(strResult) - 1
strResult = Left(strResult, length)
strResult = strResult + vbNewLine
oRS.MoveNext
Loop
oRS.Close
else
strResult = "Complete"
end if
response.write(strResult)
DBConn.close
%>

From: Amy Blankenship on

"Crash&Burn22" <webforumsuser(a)macromedia.com> wrote in message
news:g0q2d5$83h$1(a)forums.macromedia.com...
> Hello everyone,
> I have created a connection to an Access 2007 db with 6 tables in it
> useing
> the ASP example (dbaction.ASP with some minor changes to it to get it to
> connect to the db) from the Jennie Thornton book "Authorware 6 [inside
> macromedia]".

You might find the asp example at www.authorware-amy.com helpful. Also,
there are several articles there about using GET and POST with Authorware in
the tip of the week section.

You may also want to do some research on database normalization.

HTH;

Amy