Click here to Skip to main content
15,890,609 members
Home / Discussions / Database
   

Database

 
GeneralRe: First available number Pin
Colin Angus Mackay20-Jun-05 10:36
Colin Angus Mackay20-Jun-05 10:36 
GeneralWeird problem Pin
Yulianto.17-Jun-05 18:45
Yulianto.17-Jun-05 18:45 
GeneralFinding if date is between two other dates Pin
Luis Alonso Ramos17-Jun-05 14:37
Luis Alonso Ramos17-Jun-05 14:37 
GeneralRe: Finding if date is between two other dates Pin
Richard Deeming20-Jun-05 8:32
mveRichard Deeming20-Jun-05 8:32 
GeneralRe: Finding if date is between two other dates Pin
Luis Alonso Ramos20-Jun-05 18:01
Luis Alonso Ramos20-Jun-05 18:01 
GeneralUrgent help Please - UPDATE error message - Parameter[0]’Airport’has no default value. Pin
jetski441917-Jun-05 10:44
jetski441917-Jun-05 10:44 
GeneralRe: Urgent help Please - UPDATE error message - Parameter[0]’Airport’has no default value. Pin
Colin Angus Mackay17-Jun-05 12:23
Colin Angus Mackay17-Jun-05 12:23 
GeneralRe: Urgent help Please - UPDATE error message - Parameter[0]’Airport’has no default value. Pin
jetski441917-Jun-05 18:37
jetski441917-Jun-05 18:37 
Good Morning Colin,

Thank you for your reply.

Sorry about the confusion, there is no underscore at the end of the UPDATE Statement, I must have typed it in when I was sorting the message out prior to sending it.

The full code for the update stament is shown below:

 Private Sub btnBookingUPDATE_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBookingUPDATE.Click<br />
<br />
        If MessageBox.Show("Do you wish to update the record", "Update", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation) = DialogResult.Yes Then<br />
        End If<br />
<br />
        Try<br />
            'Open Connection<br />
            OleDbConnection1.Open()<br />
            Dim command As String<br />
<br />
            'set up an SQL update<br />
            command = "UPDATE BOOKINGS SET Ref = " & txtRef.Text _<br />
            & ",CustID = " & txtCustID.Text _<br />
            & ", [Coding] = " & txtCoding.Text _<br />
            & ", [Date] = '" & txtDate.Text _<br />
            & "', Adult = " & cboAdult.Text _<br />
            & ", [Child] = " & cboChild.Text _<br />
            & ", Deposit = " & txtDeposit.Text _<br />
            & ", Balance = " & txtBalance.Text _<br />
            & ", Cost = " & txtCost.Text _<br />
            & " WHERE Ref = " & txtRef.Text & ""<br />
<br />
            OleDbDataAdapter1.UpdateCommand.CommandText = command<br />
            lblSQL.Text = command<br />
<br />
            'do the update<br />
            OleDbDataAdapter1.UpdateCommand.ExecuteNonQuery()<br />
        Catch exceptionObject As Exception<br />
            MessageBox.Show(exceptionObject.Message)<br />
        Finally<br />
            OleDbConnection1.Close()<br />
<br />
        End Try<br />
    End Sub


I see you point about placing the contents of the user interface controls directly into the SQL Statement, I'll do that in future and thank you for the link.

Regards

jetski4419
GeneralAdd a timer to webform Pin
NewbieDave17-Jun-05 10:25
NewbieDave17-Jun-05 10:25 
GeneralRe: Add a timer to webform Pin
Colin Angus Mackay17-Jun-05 12:25
Colin Angus Mackay17-Jun-05 12:25 
GeneralMy Article Updated Pin
Ahmed Erarslan17-Jun-05 9:05
Ahmed Erarslan17-Jun-05 9:05 
QuestionCan i include the same columns in unique and non-unique indexes!! Pin
under281116-Jun-05 23:44
under281116-Jun-05 23:44 
AnswerRe: Can i include the same columns in unique and non-unique indexes!! Pin
Colin Angus Mackay17-Jun-05 0:25
Colin Angus Mackay17-Jun-05 0:25 
GeneralRe: Can i include the same columns in unique and non-unique indexes!! Pin
under281117-Jun-05 21:36
under281117-Jun-05 21:36 
GeneralStrong passwords Pin
Brendan Vogt16-Jun-05 21:26
Brendan Vogt16-Jun-05 21:26 
GeneralRe: Strong passwords Pin
Colin Angus Mackay16-Jun-05 22:41
Colin Angus Mackay16-Jun-05 22:41 
GeneralAlter Table with constraint Pin
.NetRams16-Jun-05 19:10
.NetRams16-Jun-05 19:10 
GeneralRe: Alter Table with constraint Pin
Colin Angus Mackay16-Jun-05 22:43
Colin Angus Mackay16-Jun-05 22:43 
Generalon using DataSet Pin
ppp00116-Jun-05 19:05
ppp00116-Jun-05 19:05 
GeneralMy Program uses Microsoft Access Pin
Sasuko16-Jun-05 8:29
Sasuko16-Jun-05 8:29 
GeneralRe: My Program uses Microsoft Access Pin
Hesham Amin18-Jun-05 4:02
Hesham Amin18-Jun-05 4:02 
GeneralInstalling SQL CE on PPC2003 Pin
Rossi4616-Jun-05 3:55
Rossi4616-Jun-05 3:55 
GeneralNow i have my database connected Pin
deeboy16-Jun-05 3:49
deeboy16-Jun-05 3:49 
GeneralDataset.Merge problem Pin
Eduard Keilholz16-Jun-05 3:12
Eduard Keilholz16-Jun-05 3:12 
GeneralRe: Dataset.Merge problem Pin
Eduard Keilholz16-Jun-05 4:05
Eduard Keilholz16-Jun-05 4:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.