
The Update Button does nothing. The save Button will inset the new record into the combo box and make the controls read only, but the will not save to database. It also locks the form completely, cannot exit without closing form. When I pull it back up no record is saved. I have came a long way though. No errors on the forms code.
'SienaSantolina
'Capstone
Imports System.Data
Public Class CamperMaintenanceForm
Private aCamperDataTier As New CamperDataTier
Private aYouthCampDataSet As YouthCampDataSet
Private WithEvents aCamperBindingSource As BindingSource
'1
Private addingBoolean As Boolean = False
Private editingBoolean As Boolean = False
Private closingBoolean As Boolean = False
Private previousSelectedIndex As Integer
Private setupCompleteBoolean As Boolean = False
Private Shared anInstance As CamperMaintenanceForm
Public Shared ReadOnly Property Instance() As CamperMaintenanceForm
Get
If anInstance Is Nothing Then
anInstance = New CamperMaintenanceForm
End If
Return anInstance
End Get
End Property
Private Sub GroupBox4_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CamperInfoBox.Enter
End Sub
Private Sub CamperNameLabel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles camperNameLabel.Click
End Sub
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles parentLastNameTextBox.TextChanged
End Sub
Private Sub homeChurchLabel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles churchNameLabel.Click
End Sub
Private Sub CamperMaintenanceForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Me.Load
Try
With Me
'Create an instance of the data-tier component.
aCamperDataTier = New CamperDataTier
'Retrieve the dataSet from the data tier.
aYouthCampDataSet = aCamperDataTier.GetDataSet
'Set up the Binding Source
.aCamperBindingSource = New BindingSource
With .aCamperBindingSource
.DataSource = Me.aYouthCampDataSet
.DataMember = "camper"
.Sort = "LastName"
End With
'Bind the controls
'needs to be updated with FULL NAME and Possibly DataSourceUpdate to allow?
'check fields of zip, number etc
'need a allergy, medications, parentsFirstName, ParentsLastName, exceptions field on table
'do we need an age? birthday? on table?
'PastorName, ChurchPhoneNumber on Churches Table
'City State Zip pulled from CITYSTATEZIPTABLE
With .CamperComboBox
.DataSource = Me.aCamperBindingSource
.DisplayMember = "LastName"
.DataBindings.Add("text", aCamperBindingSource, "LastName", _
False, DataSourceUpdateMode.Never)
End With
.firstNameTextBox.DataBindings.Add("text", _
.aCamperBindingSource, "FirstName", False, DataSourceUpdateMode.OnValidation)
.lastNameTextBox.DataBindings.Add("text", _
.aCamperBindingSource, "LastName", False, DataSourceUpdateMode.OnValidation)
.streetTextBox.DataBindings.Add("text", _
.aCamperBindingSource, "StreetAddress", False, DataSourceUpdateMode.OnValidation)
.cityTextBox.DataBindings.Add("text", _
.aCamperBindingSource, "City", False, DataSourceUpdateMode.OnValidation)
.stateTextBox.DataBindings.Add("text", _
.aCamperBindingSource, "State", False, DataSourceUpdateMode.OnValidation)
'cant bind at zip?
.zipCodeTextBox.DataBindings.Add("text", _
.aCamperBindingSource, "Zip", False, DataSourceUpdateMode.OnValidation)
.camperPhoneNumberTextBox.DataBindings.Add("text", _
.aCamperBindingSource, "PhoneNumber", Nothing, False, DataSourceUpdateMode.OnValidation)
.allergiesTextBox.DataBindings.Add("text", _
.aCamperBindingSource, "Allergies", Nothing, False, DataSourceUpdateMode.OnValidation)
.medicationsTextBox.DataBindings.Add("text", _
.aCamperBindingSource, "Medications", Nothing, False, DataSourceUpdateMode.OnValidation)
.activityExemptionTextBox.DataBindings.Add("text", _
.aCamperBindingSource, "Exemptions", Nothing, False, DataSourceUpdateMode.OnValidation)
.parentFirstnameTextBox.DataBindings.Add("text", _
.aCamperBindingSource, "ParentFirstName", False, DataSourceUpdateMode.OnValidation)
.parentLastNameTextBox.DataBindings.Add("text", _
.aCamperBindingSource, "ParentLastName", False, DataSourceUpdateMode.OnValidation)
.homeNumberTextBox.DataBindings.Add("text", _
.aCamperBindingSource, "GuardianPhoneNumberH", Nothing, False, DataSourceUpdateMode.OnValidation)
.workNumberTextBox.DataBindings.Add("text", _
.aCamperBindingSource, "GuardianPhoneNumberW", Nothing, False, DataSourceUpdateMode.OnValidation)
.cellPhoneTextBox.DataBindings.Add("text", _
.aCamperBindingSource, "GuardianPhoneNumberC", Nothing, False, DataSourceUpdateMode.OnValidation)
.AgeTextBox.DataBindings.Add("text", _
.aCamperBindingSource, "Age", False, DataSourceUpdateMode.OnValidation)
.birthDateTextBox.DataBindings.Add("text", _
.aCamperBindingSource, "Birthday", False, DataSourceUpdateMode.OnValidation, "d")
.homeChurchTextBox.DataBindings.Add("text", _
.aCamperBindingSource, "ChurchName", Nothing, False, DataSourceUpdateMode.OnValidation)
.pastorNameTextBox.DataBindings.Add("text", _
.aCamperBindingSource, "PastorName", Nothing, False, DataSourceUpdateMode.OnValidation)
.churchNumberTextBox.DataBindings.Add("text", _
.aCamperBindingSource, "ChurchPhoneNumber", Nothing, False, DataSourceUpdateMode.OnValidation)
End With
'displays date in status bar-useful for adding campers
With Me
DateToolStripStatusLabel.Text = Now.ToShortDateString
TimeToolStripStatusLabel.Text = Now.ToLongTimeString
End With
Catch ex As Exception
MessageBox.Show("Error Creating the data tier component " & ex.Message)
End Try
End Sub
Private Sub CamperMaintenanceForm_Activated(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Activated
Me.CamperComboBox.Focus()
End Sub
Private Sub CamperMaintenanceForm_FormClosing(ByVal sender As Object, _
ByVal e As System.Windows.Forms.FormClosingEventArgs) _
Handles Me.FormClosing
Dim responseDialogResult As DialogResult
With Me
.closingBoolean = True
If .aYouthcampDataSet.HasChanges Then
responseDialogResult = MessageBox.Show("Save the database Changes?", _
"Changed Data", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question)
Select Case responseDialogResult
Case Windows.Forms.DialogResult.Yes
.saveDataSet()
Case Windows.Forms.DialogResult.Cancel
e.Cancel = True
End Select
End If
End With
'Release the instance of this form
anInstance = Nothing
e.Cancel = False
End Sub
Private Sub DateToolStripStatusLabel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DateToolStripStatusLabel.Click
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
With Me
.DateToolStripStatusLabel.Text = Now.ToShortDateString()
.TimeToolStripStatusLabel.Text = Now.ToLongTimeString()
End With
End Sub
Private Sub firstNameTextBox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles firstNameTextBox.TextChanged
End Sub
Private Sub firstNameTextBox_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles firstNameTextBox.Validating
'validate for a required entry
'cancel any previous error
ErrorProvider1.SetError(firstNameTextBox, "")
With Me.firstNameTextBox
If .Text = String.Empty Then
'cancel the event
e.Cancel = True
ErrorProvider1.SetError(firstNameTextBox, "Required.")
End If
End With
End Sub
Private Sub lastNameTextBox_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles lastNameTextBox.Validating
'validate for a required entry
'cancel any previous error
ErrorProvider1.SetError(lastNameTextBox, "")
With Me.lastNameTextBox
If .Text = String.Empty Then
'cancel the event
e.Cancel = True
ErrorProvider1.SetError(lastNameTextBox, "Required.")
End If
End With
End Sub
Private Sub streetTextBox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles streetTextBox.TextChanged
End Sub
Private Sub streetTextBox_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles streetTextBox.Validating
'validate for a required entry
'cancel any previous error
ErrorProvider1.SetError(streetTextBox, "")
With Me.streetTextBox
If .Text = String.Empty Then
'cancel the event
e.Cancel = True
ErrorProvider1.SetError(streetTextBox, "Required.")
End If
End With
End Sub
Private Sub cityTextBox_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles cityTextBox.Validating
'validate for a required entry
'cancel any previous error
ErrorProvider1.SetError(cityTextBox, "")
With Me.cityTextBox
If .Text = String.Empty Then
'cancel the event
e.Cancel = True
ErrorProvider1.SetError(cityTextBox, "Required.")
End If
End With
End Sub
Private Sub stateTextBox_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles stateTextBox.Validating
'cancel any previous error
ErrorProvider1.SetError(stateTextBox, "")
With Me.stateTextBox
If .Text.Length <> 2 Then
'cancel the event and select the text.
e.Cancel = True
.SelectAll()
ErrorProvider1.SetError(stateTextBox, "Must be 2 Characters.")
End If
End With
End Sub
Private Sub parentFirstnameTextBox_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles parentFirstnameTextBox.Validating
'validate for a required entry
'cancel any previous error
ErrorProvider1.SetError(parentFirstnameTextBox, "")
With Me.parentFirstnameTextBox
If .Text = String.Empty Then
'cancel the event
e.Cancel = True
ErrorProvider1.SetError(parentFirstnameTextBox, "Required.")
End If
End With
End Sub
Private Sub parentLastNameTextBox_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles parentLastNameTextBox.Validating
'validate for a required entry
'cancel any previous error
ErrorProvider1.SetError(parentLastNameTextBox, "")
With Me.parentLastNameTextBox
If .Text = String.Empty Then
'cancel the event
e.Cancel = True
ErrorProvider1.SetError(parentLastNameTextBox, "Required.")
End If
End With
End Sub
Private Sub exitBtn_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles exitBtn.Click
Me.Close()
End Sub
Private Sub exitBtn_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles exitBtn.Validating
e.Cancel = False
End Sub
Private Sub CamperComboBox_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles CamperComboBox.KeyDown
'handles the escape key while editing and adding
With Me
If (.addingBoolean Or .editingBoolean) And _
e.KeyData = Keys.Escape Then
.cancelAddOrEdit()
End If
End With
End Sub
Private Sub CamperComboBox_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CamperComboBox.SelectedIndexChanged
'here I may need a method to fill the text boxes from the combo box?
End Sub
Private Sub addCamperBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles addCamperBtn.Click
'Begin An Add Operation
Try
With Me.aCamperBindingSource
.EndEdit()
.AddNew()
End With
With Me
.addingBoolean = True
.setComboBoxBinding()
.setControlsReadOnly(False)
If .CamperComboBox.SelectedIndex <> -1 Then
'Save the index of the new record for later navigation.
.previousSelectedIndex = .CamperComboBox.Items.Count - 1
Else
.previousSelectedIndex = 0
End If
End With
Catch ex As Exception
MessageBox.Show("Error on AddNew: " & ex.Message)
End Try
End Sub
Private Sub CamperComboBox_SelectionchangeCommitted(ByVal sender As Object, ByVal e As System.EventArgs) Handles CamperComboBox.SelectionchangeCommitted
End Sub
Private Sub CamperMaintenanceForm_Load_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub CamperBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Me.Validate()
Me.aCamperBindingSource.EndEdit()
End Sub
Private Sub updateCamperBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles updateCamperBtn.Click
End Sub
Private Sub SaveButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SaveButton.Click
'save Updates and Adds to the DataSet
With Me
.ErrorProvider1.Clear()
.CamperBindingSource.EndEdit()
.addingBoolean = False
.editingBoolean = False
.setControlsReadOnly(True)
.resetbuttonsAfterEdit()
.setComboBoxBinding()
.CamperComboBox.SelectedIndex = .previousSelectedIndex
.CamperTableAdapter.Fill(YouthCampDataSet.Camper)
End With
End Sub
'procedures
Private Sub CancelAddOrEdit()
'cancel add or edit
' called from the cancel button
With Me
If .addingBoolean Then
.previousSelectedIndex -= 1
End If
.aCamperBindingSource.CancelEdit()
.addingBoolean = False
.editingBoolean = False
.setControlsReadOnly(True)
.resetbuttonsAfterEdit()
.setComboBoxBinding()
.CamperComboBox.SelectedIndex = .previousSelectedIndex
.ErrorProvider1.Clear()
End With
End Sub
Private Sub resetButtonsAfterEdit()
'reset the buttons after edit
With Me
.updateCamperBtn.Enabled = False
.addCamperBtn.Enabled = False
.SaveButton.Enabled = False
.CancelButton.Enabled = False
.exitBtn.Enabled = False
End With
End Sub
Private Sub saveDataSet()
'Save the DataSet to the original data source
With Me
If .aYouthCampDataSet.HasChanges Then
Try
.Validate()
.aCamperBindingSource.EndEdit()
.aCamperDataTier.UpdateDataSet(.aYouthCampDataSet)
.aYouthCampDataSet.AcceptChanges()
Catch ex As Exception
MessageBox.Show("Unable to save Complete Operation. " & ex.Message)
End Try
End If
End With
End Sub
Private Sub setButtonsForEdit()
' sets the buttons for an Add or Edit
With Me
.CancelButton.Enabled = True
.SaveButton.Enabled = True
If .addingBoolean Then
.StatusStrip2.Text = "Adding"
Else
.StatusStrip2.Text = "Editing"
End If
End With
End Sub
Private Sub setComboBoxBinding()
'Set the combo box to save any changes
'Saves for Add or Edit, does not save during navigation
'Sets the combo box to not allow drop-down during and Add or Edit
With Me.CamperComboBox
If (addingBoolean Or editingBoolean) Then
.DataBindings!text.DataSourceUpdateMode = DataSourceUpdateMode.OnValidation
.DropDownStyle = ComboBoxStyle.Simple
Else
.DataBindings!text.DataSourceUpdateMode = DataSourceUpdateMode.Never
.DropDownStyle = ComboBoxStyle.DropDownList
End If
End With
End Sub
Private Sub setControlsReadOnly(ByVal valueBoolean As Boolean)
'Lock or unlock the contorls
With Me
.firstNameTextBox.ReadOnly = valueBoolean
.lastNameTextBox.ReadOnly = valueBoolean
.streetTextBox.ReadOnly = valueBoolean
.cityTextBox.ReadOnly = valueBoolean
.stateTextBox.ReadOnly = valueBoolean
.zipCodeTextBox.ReadOnly = valueBoolean
.camperPhoneNumberTextBox.ReadOnly = valueBoolean
.parentFirstnameTextBox.ReadOnly = valueBoolean
.parentLastNameTextBox.ReadOnly = valueBoolean
.homeNumberTextBox.ReadOnly = valueBoolean
.workNumberTextBox.ReadOnly = valueBoolean
.cellPhoneTextBox.ReadOnly = valueBoolean
.homeChurchTextBox.ReadOnly = valueBoolean
.pastorNameTextBox.ReadOnly = valueBoolean
.churchNumberTextBox.ReadOnly = valueBoolean
.AgeTextBox.ReadOnly = valueBoolean
.birthDateTextBox.ReadOnly = valueBoolean
End With
End Sub
Private Sub CamperBindingSource_Positionchanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles CamperBindingSource.Positionchanged
End Sub
End Class
The data access(tier) Class has two errors in the "UpdateDataSet":
aCamperTableAdapter.Update(camperDeleteDataTable)
aCamperTableAdapter.Update(camperDeleteDataTable)
There is an error at "Update" on both saying "its not a member of YouthCampTableSetTableAdapters.CamperTableAdapter. This is the Code:
[code]Imports System.Data.SqlClient
Imports System.Data
Imports System.Configuration
Imports System.Configuration.ConfigurationSettings
Public Class CamperDataTier
'Declare class level variables
Private aCamperTableAdapter As YouthCampDataSetTableAdapters.CamperTableAdapter
Private aCamperToCampRelation As DataRelation
Private aYouthCampDataSet As YouthCampDataSet
Public Sub New()
Try
With Me
'instantiate the TableAdapters and DataSet.
.aCamperTableAdapter = New YouthCampDataSetTableAdapters.CamperTableAdapter()
.aYouthCampDataSet = New YouthCampDataSet
.aCamperToCampRelation = .aYouthCampDataSet.Relations!CamperToStoresRelation
'fill the dataset
.aCamperTableAdapter.Fill(.aYouthCampDataSet.Camper)
End With
Catch ex As Exception
Throw ex
End Try
End Sub
Public Function GetDataSet() As YouthCampDataSet
'return the dataset
Return aYouthCampDataSet
End Function
Public Sub UpdateDataSet(ByVal aDataSet As YouthCampDataSet)
'Save all updates to the original data source
Try
'Update child deletes
If aDataSet.Counselor.GetChanges(DataRowState.Deleted) _
IsNot Nothing Then
'Get changes for the deleted child rows only.
Dim camperDeleteDataTable As DataTable
camperDeleteDataTable = aDataSet.Camper.GetChanges(DataRowState.Deleted)
aCamperTableAdapter.Update(camperDeleteDataTable)
End If
'update all parent row Adds, Deletes and Edits.
If aDataSet.Camper.GetChanges(DataRowState.Added + DataRowState.Modified) _
IsNot Nothing Then
'get changes for the added and changed rows only
Dim camperAddDataTable As DataTable
camperAddDataTable = aDataSet.Camper.GetChanges(DataRowState.Added + DataRowState.Modified)
Me.aCamperTableAdapter.Update(camperAddDataTable)
End If
Catch ex As Exception
Throw ex
End Try
End Sub
'Sql stuff pulled from Tutorial on DIC
'dont know if any of this is helping at all
''' <summary>
''' Returns a BindingSource, which is used with, for example, a DataGridView control
''' </summary>
''' <param name="cmd">"pre-Loaded" command, ready to be executed</param>
''' <returns>BindingSource</returns>
''' <remarks>Use this function to ease populating controls that use a BindingSource</remarks>
Public Shared Function GetBindingSource(ByVal cmd As SqlCommand) As BindingSource
'declare our binding source
Dim oBindingSource As New BindingSource()
' Create a new data adapter based on the specified query.
Dim daGet As New SqlDataAdapter(cmd)
' Populate a new data table and bind it to the BindingSource.
Dim dtGet As New DataTable()
'set the timeout of the SqlCommandObject
cmd.CommandTimeout = 240
dtGet.Locale = System.Globalization.CultureInfo.InvariantCulture
Try
'fill the DataTable with the SqlDataAdapter
daGet.Fill(dtGet)
Catch ex As Exception
'check for errors
MsgBox(ex.Message, MsgBoxStyle.OkOnly, "Error receiving data")
Return Nothing
End Try
'set the DataSource for the BindingSource to the DataTable
oBindingSource.DataSource = dtGet
'return the BindingSource to the calling method or control
Return oBindingSource
End Function
''' <summary>
''' Method for handling the ConnectionState of
''' the connection object passed to it
''' </summary>
''' <param name="conn">The SqlConnection Object</param>
''' <remarks></remarks>
Public Shared Sub HandleConnection(ByVal conn As SqlConnection)
With conn
'do a switch on the state of the connection
Select Case .State
Case ConnectionState.Open
'the connection is open
'close then re-open
.Close()
.Open()
Exit Select
Case ConnectionState.Closed
'connection is open
'open the connection
.Open()
Exit Select
Case Else
.Close()
.Open()
Exit Select
End Select
End With
End Sub
'procedures for passing variables from sql
Public Shared Function InsertNewRecord(ByVal item1 As String, ByVal item2 As String, ByVal item3 As String) As Boolean
'If not using the Express Edition uncomment the next line
'Dim cnInsert As New SqlConnection(GetConnectionString("YourConnName"))
'If using Express Edition uncomment the next line
Dim cnInsert As New SqlConnection("F:\YouthCamp(CapStone FINAL)\YouthCamp(CapStone)\YouthCamp.mdf")
Dim cmdInsert As New SqlCommand
Dim sSQL As New String("")
Dim iSqlStatus As Integer
'Set the stored procedure we're going to execute
sSQL = "YourProcName"
'Inline sql needs to be structured like so
'sSQL = "INSERT INTO YourTable(column1,column2,column3) VALUES('" & item1 & "','" & item2 & "','" & item3 & "')"
'Clear any parameters
cmdInsert.Parameters.Clear()
Try
'Set the SqlCommand Object Properties
With cmdInsert
'Tell it what to execute
.CommandText = sSQL 'Your sql statement
'Tell it its a stored procedure (if using inline sql uncomment this line
'.CommandType = CommandType.StoredProcedure 'CommandType.Text for inline sql
'If you arent using a stored procedure uncomment the next line
'.CommandType = CommandType.StoredProcedure 'For inline sql
'If you are indeed using a stored procedure
'the next 3 lines pertain to you
'Now add the parameters to our procedure
'NOTE: Replace @value1.... with your parameter names in your stored procedure
'and add all your parameters in this fashion
.Parameters.AddWithValue("@value1", item1)
.Parameters.AddWithValue("@value2", item2)
.Parameters.AddWithValue("@value3", item3)
'Set the connection of the object
.Connection = cnInsert
End With
'Now take care of the connection
HandleConnection(cnInsert)
'Set the iSqlStatus to the ExecuteNonQuery
'status of the insert (0 = success, 1 = failed)
iSqlStatus = cmdInsert.ExecuteNonQuery
'Now check the status
If Not iSqlStatus = 0 Then
'DO your failed messaging here
Return False
Else
'Do your success work here
Return True
End If
Catch ex As Exception
MsgBox("ex.Message,MsgBoxStyle.OkOnly", "Error")
Finally
'Now close the connection
HandleConnection(cnInsert)
End Try
End Function
Public Shared Function UpdateRecord(ByVal item1 As String, ByVal item2 As String, ByVal id As Integer) As Boolean
'If not using the Express Edition uncomment the next line
'Dim cnInsert As New SqlConnection(GetConnectionString("YourConnName"))
'If using Express Edition uncomment the next line
Dim cnInsert As New SqlConnection("F:\YouthCamp(CapStone FINAL)\YouthCamp(CapStone)\YouthCamp.mdf")
Dim cmdUpdate As New SqlCommand
Dim sSQL As New String("")
Dim iSqlStatus As Integer
'Set the stored procedure we're going to execute
sSQL = "YourProcName"
'Inline sql needs to be structured like so
'sSQL = "UPDATE YourTable SET column1 = '" & item1 & "',column2 = '" & item2 & "' WHERE YourId = " & id
'Clear any parameters
cmdUpdate.Parameters.Clear()
Try
'Set the SqlCommand Object Properties
With cmdUpdate
'Tell it what to execute
.CommandText = sSQL 'Your sql statement
'Tell it its a stored procedure (if using inline sql uncomment this line
Attached File(s)
-
YouthCamp_CapStone___2_.zip (508bytes)
Number of downloads: 43
This post has been edited by absynthe: 08 November 2008 - 03:41 PM

New Topic/Question
Reply




MultiQuote







|