This topic is locked

Update Problem

3/21/2003 7:38:07 AM
ASPRunnerPro General questions
author

Hi, I am testing your ASPRunner, it is very fast to create ASP pages.
I have some errors when I tried to add new record, the ASP pages were created based on a query in the table.
[Microsoft][ODBC Microsoft Access Driver] Cannot update 'Well_Location'; field not updateable.

The field is not a primary key.
The same field I can edit without a problem.
There was another error to when I added new record, I solved it by changing the field allowing zero-length string. But I bit puzzled, the field really is null and should not be zero-length string. Does ASPRunner allow null field to be added.
I read one of your posting saying ASPRunner is designed to work with single database table. And you had shown some workaround to work with more tables. In my database I have a field is a primary key for two tables, I would like to be able to add the record to one table and the other table is automatically be updated. Is that possible with ASPRunner?
Your help is very much appreciated.

Sergey Kornilov admin 3/21/2003

Michellle,
I guess WellLocation field is autonumber which means it cannot be updated.

Is that right?
Currently ASPRunner sends empty strings to the database instead of NULLs if no value entered.

I will make it optional in the next version.
Regarding you last question: I'm not sure I understand how do you use the same primary key field for two tables. Could you explain it to me?
Sergey Kornilov

500014 3/24/2003

Hi,
thank you for your reply.

  1. The Well_Location is not autonumber, but it has a input mask to make sure the user entering the right format, (eg. 001a01)
  2. I am sorry I did not explain my problem clearly, what I mean is that I have a field is a primary key for one table, the same field is also in another table not as foreign key but also as a primary key. (There is a reason, I did not combine the two tables).
    Thanks for the reply.

500015 3/24/2003

Hi, Sergey,
Found out why I could not update the field. But there is another problem occured, the edit and delete links on each page are not corresponding to the correct records ( for some records). I have three fields as combine primary keys for that table, is it the reason why?
Michelle

Sergey Kornilov admin 3/24/2003

Michelle,
Primary key should contain unique values for each record ( doesn't matter if it's a single field or fields combination ).
you need to make sure that this three fields combination is unique for each record.
Sergey Kornilov

500016 3/25/2003

Hi, Sergey,
The three fields combination is unique for each record in my database, but when I run ASPrunner at Select Key Fields Page, there is only one of the three combine fields flaged as Primary Key, because one of three Primary Keys is not Unique, it probably why it did not work. If I ticked the three fields together (obviously it still does not meet the "unique condition"), it did not work either.
Regards,
Michelle

Sergey Kornilov admin 3/25/2003

Michelle,
lets do this: zip and send me the whole content of your output folder including database. I'll test it on my local box and see what's wrong with it.
Just send it to support AT xlinesoft.com
Sergey Kornilov

500017 3/28/2003

Hi,
Send the zip file.
Michelle L