I've never actually written to the data in the DBA database, but i use the data from DBA and a mysql database to run a serialnumber log. The ASP code I use to connect to DBA is as follows:
<%
'Betrieve Connetcion
dim DBAConn
set DBAConn = Server.CreateObject("ADODB.Connection")
DBAConn.Open "DSN=DBA", "", ""
'Sales Order Line Items "BKARINVL_B"
dim SOLineItemsRS, RSConString
set SOLineItemsRS = Server.CreateObject("ADODB.RecordSet")
RSConString = "SELECT * FROM " & chr(34) & "BKARINVL_B" & chr(34)
set SOLineItemsRS = DBAConn.Execute(RSConString)
'Sales Order Header "BKARINV_B"
dim SalesOrderRS
set SalesOrder = Server.CreateObject("ADODB.RecordSet")
RSConString = "SELECT * FROM " & chr(34) & "BKARINV_B" & chr(34)
set SalesOrderRS = DBAConn.Execute(RSConString)
%>
<h2>Please choose which line you are shipping against:</h2>
<table border="1" cellpadding="5">
<tr><td><strong>SO#:</strong> </td>
<td><strong>Line#:</strong></td>
<td><strong>Model:</strong></td>
<td><strong>Description:</strong></td>
<td><strong>Customer:</strong></td>
<td><strong>Customer SO#:</strong></td>
<td><strong>Qty:</strong></td>
<td><strong>Shipped:</strong></td>
<td><strong>On BO:</strong></td>
<td><strong>Ship Date:</strong></td></tr>
<%
dim SONum
do while not SalesOrderRS.EOF
if InputSalesOrderNumber = trim(SalesOrderRS("BKAR_INV_CUSORD").VALUE) then
SONum = SalesOrderRS("BKAR_INV_SONUM").VALUE
do while not SOLineItemsRS.EOF
if trim(SONum) = trim(SOLineItemsRS("BKAR_INVL_INVNM").VALUE) then
' make sure the line is not an option or other...
if Instr(SOLineItemsRS("BKAR_INVL_UM_LN[ 1]").Value, "C") = 0 and Instr(SOLineItemsRS("BKAR_INVL_UM_LN[ 1]").Value, "M") = 0 and Instr(SOLineItemsRS("BKAR_INVL_UM_LN[ 1]").Value, "A") = 0 and cint(SOLineItemsRS("BKAR_INVL_OOQTY").Value) <> 0 then
%>
<tr><td><% = SOLineItemsRS("BKAR_INVL_INVNM").Value%></td>
<td><a href="add_sn.asp?so=<%=SONum%>&linenumber=<% = SOLineItemsRS("BKAR_INVL_UM_LN[ 1]").Value%>"><% = SOLineItemsRS("BKAR_INVL_UM_LN[ 1]").Value%></a></td>
<td><% = SOLineItemsRS("BKAR_INVL_PCODE").Value%></td>
<td><% = SOLineItemsRS("BKAR_INVL_PDESC").Value%></td>
<td><% = SalesOrderRS("BKAR_INV_CUSCOD").Value%></td>
<td><% = SalesOrderRS("BKAR_INV_CUSORD").Value%></td>
<td><% = SOLineItemsRS("BKAR_INVL_OOQTY").Value%></td>
<td><% = SOLineItemsRS("BKAR_INVL_USTD").Value%></td>
<td><% = SOLineItemsRS("BKAR_INVL_UBO").Value%></td>
<td><% = SOLineItemsRS("BKAR_INVL_ESD").Value%></td>
</tr>
<%
end if
end if
SOLineItemsRS.MoveNext
loop
end if
SalesOrderRS.MoveNext
loop
SOLineItemsRS.close
set SOLineItemsRS = Nothing
DBAConn.close
set DBAConn = Nothing
%>
</table>
Pretty basic stuff that shows some info from the sales order files in DBA. I haven't had any problems with the data showing up incorrectly... but I havent gone that deep into the data files with ASP. That was some of the first ASP code I ever wrote, so please don't flame me...