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 -> GotoCode Archive

 Tree Form with Char Cat_ID and Par_Cat_ID

Print topic Send  topic

Author Message
Silvercat
Posted: 01/09/2002, 12:53 AM

Can anybody help?

The Tree Form only works seamlessly when the Category ID and PArent Category ID are integers. However, if you need to use it with a Character typed Category ID and Parent Category ID, it fails. I am using ASP+MSSQL and MS ODBC treats the value as a column name instead of a string.

That is, if the link says

http://www.mysite.com/app/TreeTest.asp?FormName=Tree&CAT_ID=A

It gets an Internal Server error which is

Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name 'A'.

It seems that if I manually edit the URL as

http://www.mysite.com/app/TreeTest.asp?FormName=Tree&CAT_ID='A'

it will work fine... but the code generated by code charge doesn't put the quotation mark so it works only with integers.

any idea for work around?
Silvercat
Posted: 01/09/2002, 4:44 AM

After testing the Integer based Cat_ID, Par_Cat_ID. I decided to change them to char. I then generate the page in ASP format and it didn't work as expected.

But I have tried to change the URL of the generated code from

www.mysite.com/page?cat_id=A

into

www.mysite.com/page?cat_id='A'

and it did not have the error so I decided to edit the generated file and change all line that refer to sWhere which construct the where clause from

sWhere = " where cat_id =" & sCatID

into

sWhere = " where cat_id ='" & sCatID & "'"

then saved it and tried.

IT WORKED!

I tried it with both text and number type for category ID and it worked!
I don't know if this will work with other database or other language. Maybe this is the way to make code charge to work with IDs with spaces in between too.

For now, this is the only I know how to make it work, anybody have a better solution?

   


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

MS Access to Web

Convert MS Access to Web.
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.