1

hey guys
i am trying to create a library management system which is supposed to be used to store/keep infp for the library and the library members( book title, author, name and picture for borrower and other stuffs). The app has 6 buttons, delete, save, add,previsous,next, and upload( for upload picture ). The app is working correctly on my computer which is a debeloping machine but when i try to install the app on anothee commpiter after packaging it, it is failing to save the new record inckusing the picture. Am using microsoft access as the datasource.
here is the code attachws to the save button.

Table1BindinSource.EndEdit()
Table1TableAdapter.Update(Your_DatabaseDataset.Table1)

Any help will be highly appreciated. Thanks in advance

Edited by Reverend Jim: Corrected code formatting

4
Contributors
10
Replies
89
Views
8 Months
Discussion Span
Last Post by Reo_1
Featured Replies
  • 1
    ddanbe 2,577   8 Months Ago

    What does` ex.Message` say? The meaning of the catch clause is not, to write out some personal message to the user. The only useful it tells here, is perhaps that the error occured while updating your DB. `ex.Message` might tell you more. Read More

0

Exactly pritaeas am getting an error. What am i likely to forget installing?

0

What is an error? I haven't the faintest idea. So how do you hope we can help you, if you don't give us anymore clues? WHAT error, line number in the code, code etc.

0

hey ddanbe
here is the code attached to the save button

try
    Table1BindinSource.EndEdit()
    Table1TableAdapter.Update(Your_DatabaseDataset.Table1)
    msg(" data saved")
catch ex As Exeption
    msg(" error occured while saving data").

i tried to run the app on another computer that doesnt have visual basic installed on it. If i try to run it Immediately after installation it is only save three new records and start displaying the msgbox saying " error occured while saving data". I dont know where i went wrong. whethee its when packaging the files or its in my coding. Please help if you can.

Edited by Reverend Jim: Corrected code formatting

1

What doesex.Message say?
The meaning of the catch clause is not, to write out some personal message to the user.
The only useful it tells here, is perhaps that the error occured while updating your DB.
ex.Message might tell you more.

0

the only message iam getting is " error occured while saving data" . Now where am i missing it?

0

Error messages can sometimes say almost nothing. Perhaps it's your DB. Why don't you use the one integrated in VS?

0

Alright ddande let me try to use the one integrated in vs

1
try
catch ex as exception
    messagebox.show(ex.message)
end try

use this type try catch. then you can get real error details

Edited by Reverend Jim: Corrected code formatting

0

Hey Sashika
i tried using your code and the following is the error message iam getting; "Concurrency violation: the UpdateCommand affected 0 of the expected 1 records."

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.