Friday, February 5, 2010

The ADO Example Fix

Speak of brain farts. . . I figured out why the code we did in class didn't work and why it didn't throw any errors. We forgot to call the method that actually writes the data to the database. I added a call to the method in the constructor of the DataLayer class. Here is the code for the constructor now.

Public Sub New(ByRef p As Person, ByRef d As Donation)
pers = p
don = d
connect = New SqlConnection("Data source=.\sqlexpress;initial catalog=communityAssist;integrated security=true;")
'we forgot to call the method that actually writes the data
writeDonation()

End Sub


I will post the rest of the code before the weekend is over.

No comments:

Post a Comment