Beach Access Software
bchacc at san.rr.com
Tue Oct 3 19:13:59 CDT 2006
Dear List:
I’m not an ADO guy. Is there something wrong with the insert statement?
I’m assuming the connection string is valid. If it isn’t would it barf on
Conn.ConnectionString = Bwq?
I believe that the code execute4s without blowing but the record does not
appear in the table.
MTIA,
Rocky
_____
From: James Charlton [mailto:James at charltonweeks.com]
Sent: Tuesday, October 03, 2006 2:02 PM
To: Rocky Smolin
Subject: ADO
Any guess why this does not apend the required record?
Bwq is the connection string from a global constant
Public Sub IVWills(ByVal PID As Integer)
Dim Conn As ADODB.Connection, RS As ADODB.Recordset
Set Conn = New ADODB.Connection
Conn.ConnectionString = Bwq
Conn.Open
Set RS = New ADODB.Recordset
RS.ActiveConnection = Conn
RS.Source = "INSERT INTO [tIVProjectDetail] ( [ProjectID#], Item, Amount
) " & _
"SELECT '" & PID & "', ""Wills (2):"", 0"
'Start the transaction
Conn.BeginTrans
RS.Open
Conn.CommitTrans ' Commit the transaction
Conn.Close
End Sub
James W. M. Charlton
Charlton Weeks LLP
Attorneys at Law
(661) 265-0969
(800) 388-9878
--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.407 / Virus Database: 268.12.12/461 - Release Date: 10/2/2006
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.407 / Virus Database: 268.12.12/461 - Release Date: 10/2/2006