DataAssist extension detail/update page not working


I'm using the DataAssist extension in Dreamweaver and having some problems. I use the DataAssist Wizard to generate these pages:

Search, Detail, Update, Results

Everything seems to work perfectly with all the functionality working, except for the following two problems:

1. When I try to view a detail page, the link does not work. The field that I am trying to link on is a 15-digit number. By default, the wizard declares the variables below as "double" data type, and the the link does not work. When I change the data type from "double" to "decimal" as shown below, the linking works:

$query_WADAtblproperties = sprintf("SELECT * FROM tblproperties WHERE Roll = %s OR ( -1= %s AND Roll= %s)", GetSQLValueString($ParamRoll_WADAtblproperties, "decimal"),GetSQLValueString($ParamRoll2_WADAtblpr operties, "decimal"),GetSQLValueString($ParamSessionRoll_WAD Atblproperties, "decimal"));

Does this fix that I somehow discovered make sense? Should I need to be playing around with the data types after the wizard has created the pages? I don't know if making this change is somehow causing my second problem.

2. The second problem is that the links to the Detail and Update pages are working only intermittently at best. For example,

- some records link correctly to the correct Detail and Update pages;
- some records result in 'No Record Found', but should be finding records; and
- some records link to the wrong Detail and Update pages. Although the correct record number is shown in the URL, the resulting WADADetailsContainer displays data from a different record. i.e. record 1 shown in URL, but record 2 details displayed in container.

Those are my two problems. If someone can help me figure these out I would be eternally grateful. Kind regards,
DanielAttardAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jason C. LevineNo oneCommented:
Hi Daniel,

>> By default, the wizard declares the variables below as "double" data type

What is the column defined as in the MySQL?  

>>  Should I need to be playing around with the data types after the wizard has created the pages?

No, you shouldn't but the catch is how the database is set up.  If you are converting number columns from an MS Access table, you may run into issues on the MySQL end.  Access likes double and decimal in places where the logical conversion is to Integer.  Doubles and Decimals may not accept input from the form correctly after they are run through the GetSQLValueString() function.

>> 2. The second problem is that the links to the Detail and Update pages are working only intermittently at best.

Yes, that could be caused by switching the data type above.  What I would do is go through the table definitions and whenever possible, switch the column type to Integer (especially for these key fields).  Then reapply the server behaviors in Dreamweaver so the variables are passed to GetSQLValueString() as "int" and see if that stablizes the app.



0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
DanielAttardAuthor Commented:
Hi Jason,

>> Doubles and Decimals may not accept input from the form correctly after they are run through the GetSQLValueString() function.

Agreed.  I tried converting my Decimal data type 'roll' field to a Double data type because the Double data type is listed in this function:

  switch ($theType) {
 . . .
    case "double":
      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;

However, this still did not work, no doubt because of what you said above, that the Double type field does not work properly when run through the GetSQLValueString() function.

That being said, what am I left with?  I have a 15-digit number that I would like to use as my primary key, but because of its' size/length I cannot store this as an Integer.  I could store it as BigInt, but I have tried that and it also does not work properly when run through the GetSQLValueString() function.

Ideally, what Data Type should I use to store numbers like these so that the stored value will work correctly in the GetSQLValueString() function?
0
DanielAttardAuthor Commented:
These are some examples of the numbers that need to be stored:

190405232000945
020454782210011
211043870922500

Some have trailing and/or leading zeros that I would like to store, only for purposes of data consistency.  
0
HTML5 and CSS3 Fundamentals

Build a website from the ground up by first learning the fundamentals of HTML5 and CSS3, the two popular programming languages used to present content online. HTML deals with fonts, colors, graphics, and hyperlinks, while CSS describes how HTML elements are to be displayed.

DanielAttardAuthor Commented:
Jason - I've tried using Char(15) as the Data Type and, being a text field, it works perfectly in the GetSQLValueString() function.  So, unless you can tell me a reason why I should not use a Char(15) field as a Primary Key, I am inclined to go with this choice.

The only lingering issue for me now seems to be the issue of leading zeros, but I'll leave that for another day and another question.
0
Jason C. LevineNo oneCommented:
If you have leading zeros then you can't use a numeric field.  Char or varchar are your only options
0
DanielAttardAuthor Commented:
Thanks for the help.  Varchar working nicely for me.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.