Urgent - UPDATE error message - Parameter[0]’Airport’has no dafault value.

jetski4419

New member
Joined
Jun 17, 2005
Messages
3
Programming Experience
Beginner
I have designed a MS Access 2000 Database which has three tables CUSTOMERS, BOOKINGS & HOLIDAYS to control data entry I have designed three vb.NET Forms. A user is able to SELECT, INSERT, UPDATE and DELETE records on each table.



CUSTOMERS & HOLIDAYS are working fine – no worries. The problem is with the INNER JOIN Table BOOKINGS. The tables are linked by the attribute Coding, the Pk in HOLIDAYS and the Fk in BOOKINGS.



HOLIDAYS table attributes are:

Coding (NUMBER). Pk

Out (DATE)

Return (DATE)

Airport (TEXT)

Country (TEXT)

Destination (TEXT)

Hotel (TEXT)

Rating (NUMBER)

Night (NUMBER)

Price (CURRENCY FIXED)



BOOKINGS table attributes are:

Ref (NUMBER)

CustID (NUMBER)

Coding (NUMBER)

Date (DATE)

Adult (NUMBER)

Child (NUMBER)

Deposit (CURRENCY FIXED)

Balance (CURRENCY)

Cost (CURRENCY)



The Error/Information message, which is just a list, is:



Parameter[0]’Airport’has no default value.



Following in the same syntax is: Country, Destination, Hotel, Night, Out, Price, Rating, Return



The error message then changes slightly to 'Original_attribute name'.



Parameter[9]'Original_Coding’has no default value.



Then the following are listed as above: Original_Country, Original_Destination, Original_Hotel, Original_Night, Original_Out, Original_Price, Original_Rating, and lastly Original_Return. All the messages return - has no default value???



Note the error message appears on the BOOKINGS UPDATE, although all the attributes mentioned are in the HOLIDAYS table, also the errors are not returned in the order of the attributes in the HOLIDAYS table (see above).



Below is the BOOKINGS UPDATE Statement I have used:



command = "UPDATE BOOKINGS SET Ref = " & txtRef.Text _
& ",CustID = " & txtCustID.Text _

& ", [Coding] = " & txtCoding.Text _

& ", [Date] = '" & txtDate.Text _

& "', Adult = " & txtAdult.Text _

& ", [Child] = " & txtChild.Text _

& ", Deposit = " & txtDeposit.Text _

& ", Balance = " & txtBalance.Text _

& ", Cost = " & txtCost.Text _

& " WHERE Ref = " & txtRef.Text & ""





It looks to me like an Array problem or the way I have set up the attributes, but what is it and how do I fix it?



I have attached a copy of the actual error message, the Database and the relevant Form for anybody to look at



Any help would be appreciated, thank you in advance.



Regards jetski4419

 

Attachments

  • UPDATE Problem.zip
    48.4 KB · Views: 28
Back
Top