[AccessD] FW: ADO

DWUTKA at marlow.com DWUTKA at marlow.com
Wed Oct 4 09:53:29 CDT 2006


Why use a recordset object?  Just use the Execute method of the connection
object.

Drew

-----Original Message-----
From: Beach Access Software [mailto:bchacc at san.rr.com] 
Sent: Tuesday, October 03, 2006 7:14 PM
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] FW: ADO

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
 
-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list