CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> CodeCharge.Discussion

 Won't Add won't Update -- Please Help!

Print topic Send  topic

Author Message
Paul
Posted: 02/16/2001, 5:21 AM

I've got a real stumper and would appreciate any help that I could get on
this one. I created an application in CodeCharge. It works great! I went
back and added 2 pages using the New Page Wizard (the pages are "Grid and
Edit". The grid page works fine but the edit page is giving me fits. When
I try to update or add a record I get the following errors...

Attempting to update a record:

Microsoft][ODBC Microsoft Access Driver] Syntax error in UPDATE statement.
(Microsoft OLE DB Provider for ODBC Drivers)

Attempting to add a new record:

[Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO
statement. (Microsoft OLE DB Provider for ODBC Drivers)

The database is created in Access 97 on a Windows 98 machine. The only thing
different between this page and the other pages, that do work, is that on
this page I'm using an autonumber for the primary key, and it is a hidden
field on the page. By the way the autonumber is set to random rather than
consecutive.

I don't even know where to begin to look for a solution so any suggestions
will be gratefully received.



Alexey Alexapolsky
Posted: 02/16/2001, 6:33 AM

This is because sql statement tries to update the whole record , with it's
primary key
and this causes an error. You do not need to update primary key , do the
following :
please set "Key" checkbox ON near your autonumbner field.
Fields marked as primary key won't be updated.
--
Regards,
Alexey
CodeCharge Support


Paul <paporter@visto.com> wrote in message
news:96j9g7$fho$1@news.codecharge.com...
> I've got a real stumper and would appreciate any help that I could get on
> this one. I created an application in CodeCharge. It works great! I went
> back and added 2 pages using the New Page Wizard (the pages are "Grid and
> Edit". The grid page works fine but the edit page is giving me fits.
When
> I try to update or add a record I get the following errors...
>
> Attempting to update a record:
>
> Microsoft][ODBC Microsoft Access Driver] Syntax error in UPDATE statement.
> (Microsoft OLE DB Provider for ODBC Drivers)
>
> Attempting to add a new record:
>
> [Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO
> statement. (Microsoft OLE DB Provider for ODBC Drivers)
>
> The database is created in Access 97 on a Windows 98 machine. The only
thing
> different between this page and the other pages, that do work, is that on
> this page I'm using an autonumber for the primary key, and it is a hidden
> field on the page. By the way the autonumber is set to random rather than
> consecutive.
>
> I don't even know where to begin to look for a solution so any suggestions
> will be gratefully received.
>
>
>
>

Paul
Posted: 02/16/2001, 7:07 AM

Thanks for responding Alexey.
If your refering to the "key checkbox" beside the field name, that is
checked on. However it is not checked on on the grid page but I'm not doing
any updateing there so I don't think that should have any effect should it?


Alexey Alexapolsky wrote in message <96jdnm$ngt$1@news.codecharge.com>...
>This is because sql statement tries to update the whole record , with it's
>primary key
>and this causes an error. You do not need to update primary key , do the
>following :
>please set "Key" checkbox ON near your autonumbner field.
>Fields marked as primary key won't be updated.
>--
>Regards,
>Alexey
>CodeCharge Support
>
>
>Paul <paporter@visto.com> wrote in message
>news:96j9g7$fho$1@news.codecharge.com...
>> I've got a real stumper and would appreciate any help that I could get on
>> this one. I created an application in CodeCharge. It works great! I
went
>> back and added 2 pages using the New Page Wizard (the pages are "Grid and
>> Edit". The grid page works fine but the edit page is giving me fits.
>When
>> I try to update or add a record I get the following errors...
>>
>> Attempting to update a record:
>>
>> Microsoft][ODBC Microsoft Access Driver] Syntax error in UPDATE
statement.
>> (Microsoft OLE DB Provider for ODBC Drivers)
>>
>> Attempting to add a new record:
>>
>> [Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO
>> statement. (Microsoft OLE DB Provider for ODBC Drivers)
>>
>> The database is created in Access 97 on a Windows 98 machine. The only
>thing
>> different between this page and the other pages, that do work, is that on
>> this page I'm using an autonumber for the primary key, and it is a hidden
>> field on the page. By the way the autonumber is set to random rather
than
>> consecutive.
>>
>> I don't even know where to begin to look for a solution so any
suggestions
>> will be gratefully received.
>>
>>
>>
>>
>
>

Alexey Alexapolsky
Posted: 02/16/2001, 9:54 AM

This must be caused by read only permissions to this table.
Since BOTH insert and update do not work.
Make sure you've specified full read-write-execute access to your mdb table
, it's directory (this
is very important).
--
Regards,
Alexey
CodeCharge Support

Paul <paporter@visto.com> wrote in message
news:96jfoc$rb3$1@news.codecharge.com...
> Thanks for responding Alexey.
> If your refering to the "key checkbox" beside the field name, that is
> checked on. However it is not checked on on the grid page but I'm not
doing
> any updateing there so I don't think that should have any effect should
it?
>
>
> Alexey Alexapolsky wrote in message

> >This is because sql statement tries to update the whole record , with
it's
> >primary key
> >and this causes an error. You do not need to update primary key , do the
> >following :
> >please set "Key" checkbox ON near your autonumbner field.
> >Fields marked as primary key won't be updated.
> >--
> >Regards,
> >Alexey
> >CodeCharge Support
> >
> >
> >Paul <paporter@visto.com> wrote in message

> >> I've got a real stumper and would appreciate any help that I could get
on
> >> this one. I created an application in CodeCharge. It works great! I
> went
> >> back and added 2 pages using the New Page Wizard (the pages are "Grid
and
> >> Edit". The grid page works fine but the edit page is giving me fits.
> >When
> >> I try to update or add a record I get the following errors...
> >>
> >> Attempting to update a record:
> >>
> >> Microsoft][ODBC Microsoft Access Driver] Syntax error in UPDATE
> statement.
> >> (Microsoft OLE DB Provider for ODBC Drivers)
> >>
> >> Attempting to add a new record:
> >>
> >> [Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO
> >> statement. (Microsoft OLE DB Provider for ODBC Drivers)
> >>
> >> The database is created in Access 97 on a Windows 98 machine. The only
> >thing
> >> different between this page and the other pages, that do work, is that
on
> >> this page I'm using an autonumber for the primary key, and it is a
hidden
> >> field on the page. By the way the autonumber is set to random rather
> than
> >> consecutive.
> >>
> >> I don't even know where to begin to look for a solution so any
> suggestions
> >> will be gratefully received.
> >>
> >>
> >>
> >>
> >
> >
>
>

Paul
Posted: 02/16/2001, 1:10 PM

I would agree with you Alexey if I was having this problem with other pages
in the program. But every page works as intended including some created
after this problem page. I tried changing the PK field into a text field
instead of hidden, or label, just to see if that had anything to do with it.
That had no effect.

If it was a permissions problem wouldn't that effect every table in the
database? An Access database consisting of only tables, no relations, no
querys, no macros, nothing has to provide the same permissions to all tables
doesn't it? I don't know how to check for permissions on a particular table;
or even if that is possible to do.

I guess I could delete the table and completely recreate it. Thats about
the only thing I haven't done. I'll try that and see if it has any effect.

Thanks again for the help Alexey I really do appreciate it.


Alexey Alexapolsky wrote in message <96jpgr$e0c$1@news.codecharge.com>...
>This must be caused by read only permissions to this table.
>Since BOTH insert and update do not work.
>Make sure you've specified full read-write-execute access to your mdb table
>, it's directory (this
>is very important).
>--
>Regards,
>Alexey
>CodeCharge Support


CodeCharge
Posted: 02/16/2001, 10:13 PM

Please email your project file (.ccs) tosupport@codecharge.com if possible.

Adam

Paul <paporter@visto.com> wrote in message
news:96j9g7$fho$1@news.codecharge.com...
> I've got a real stumper and would appreciate any help that I could get on
> this one. I created an application in CodeCharge. It works great! I went
> back and added 2 pages using the New Page Wizard (the pages are "Grid and
> Edit". The grid page works fine but the edit page is giving me fits.
When
> I try to update or add a record I get the following errors...
>
> Attempting to update a record:
>
> Microsoft][ODBC Microsoft Access Driver] Syntax error in UPDATE statement.
> (Microsoft OLE DB Provider for ODBC Drivers)
>
> Attempting to add a new record:
>
> [Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO
> statement. (Microsoft OLE DB Provider for ODBC Drivers)
>
> The database is created in Access 97 on a Windows 98 machine. The only
thing
> different between this page and the other pages, that do work, is that on
> this page I'm using an autonumber for the primary key, and it is a hidden
> field on the page. By the way the autonumber is set to random rather than
> consecutive.
>
> I don't even know where to begin to look for a solution so any suggestions
> will be gratefully received.
>
>
>
>

Paul
Posted: 02/17/2001, 8:00 AM

I finally solved this problem. It turned out that I had used a key word as
a variable name. Sometimes it seems the simplest things end up biteing one
on the butt the hardest.

One good thing that did come out of all this is that it forced me to study
the source code generated by CodeCharge. I was really impressed by on clean
and well written the code is. CodeCharge is one fine product and I look
forward to using it extensively for a very long time.

Any way I want to thank Alexey for his help and also to thank Adam for his
offer of help via private email. CodeCharge guys your the greatest. I
really do appreciate all your hard work.


Paul

phantom
Posted: 02/18/2001, 3:56 PM

I also have found this part of CC very unstable, if I sometime make a small
change and regenerate the codes it does not work properly. I have found
sometimes the problems are comming from the PK, it is not always the case. I
recommend, you constatntly backup before you make the changes. And I also
believe it a lot easier to redo the table as it can be alot easier (and time
saving), then finding out the errors.

I recently had a problems with renaming all the filenames, with CC. It
should adjust everything accordingly, but it does not work all the time!
hencing I get these errors all over the place. Lucky I backed up and revert
the pages!!!.



"Paul" <paporter@visto.com> wrote in message
news:96k500$4ba$1@news.codecharge.com...
> I would agree with you Alexey if I was having this problem with other
pages
> in the program. But every page works as intended including some created
> after this problem page. I tried changing the PK field into a text field
> instead of hidden, or label, just to see if that had anything to do with
it.
> That had no effect.
>
> If it was a permissions problem wouldn't that effect every table in the
> database? An Access database consisting of only tables, no relations, no
> querys, no macros, nothing has to provide the same permissions to all
tables
> doesn't it? I don't know how to check for permissions on a particular
table;
> or even if that is possible to do.
>
> I guess I could delete the table and completely recreate it. Thats about
> the only thing I haven't done. I'll try that and see if it has any
effect.
>
> Thanks again for the help Alexey I really do appreciate it.
>
>
> Alexey Alexapolsky wrote in message <96jpgr$e0c$1@news.codecharge.com>...
> >This must be caused by read only permissions to this table.
> >Since BOTH insert and update do not work.
> >Make sure you've specified full read-write-execute access to your mdb
table
> >, it's directory (this
> >is very important).
> >--
> >Regards,
> >Alexey
> >CodeCharge Support
>
>
>


   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.