[Gambas-user] Database table row update

Randall Morgan rmorgan62 at ...626...
Thu Feb 2 14:34:34 CET 2012


I would check the permissions on all your database tables. Also check and
make sure the table files are writable.

I know I've seen this kind of error on MySQL DBs when someone copies files
from one machine or user to another.



On Thu, Feb 2, 2012 at 4:01 AM, Shane Powell <shanep1967 at ...169...> wrote:

> On 02/02/12 22:49, John Rose wrote:
> > I think that I've narrowed down this problem on the attached Test
> > project. The run time error on the starred line below is an error
> > message stating "Update database site table record error"&  "Error:
> > Result is read-only":
> > Public Sub ButtonSave_Click()
> >    Dim latitude As Float
> >    Inc Application.Busy
> >    Print "Start of Latitude Update"
> >    latitude = ValueBoxLatitude.Value
> >    DatabaseConnection.Begin
> >    ' ResultSite.MoveTo(1)  ' this line is unnecessary
> >    ' as the Open form procedure uses it
> >    ' I get the same run-time message with it
> >    Print "Old latitude", ResultSite["latitude"]
> >    Print "New latitude", latitude
> >    Print 1
> > *****  ResultSite["latitude"] = latitude  ****
> >    Print 2
> >    ResultSite.Update()
> >    Print 6
> >    DatabaseConnection.Commit
> >    Print "End of Latitude Update"
> > Finally
> >    Dec Application.Busy
> > Catch
> >    DatabaseConnection.Rollback
> >    Error.Raise("<b>Update database site table record
> > error</b><hr>Error:<br>"&  DConv(Error.Text))
> > End
> >
> > I'm obviously missing something elementary about updating a field in one
> > of a database's table's rows.
> >
> > PS ResultSite is a Result which contains 2 rows from the site table in
> > the SQLite3 Test.db database
> >
> >
> >
> >
> >
> ------------------------------------------------------------------------------
> > Keep Your Developer Skills Current with LearnDevNow!
> > The most comprehensive online learning library for Microsoft developers
> > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> > Metro Style Apps, more. Free future releases when you subscribe now!
> > http://p.sf.net/sfu/learndevnow-d2d
> >
> >
> > _______________________________________________
> > Gambas-user mailing list
> > Gambas-user at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gambas-user
> I have not looked at all your code but are you get your result by doing
> result = dbconnection.edit("table")
> then you can edit a field , update ,commit
>
>
> ------------------------------------------------------------------------------
> Keep Your Developer Skills Current with LearnDevNow!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-d2d
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>



-- 
If you ask me if it can be done. The answer is YES, it can always be done.
The correct questions however are... What will it cost, and how long will
it take?



More information about the User mailing list