Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 Problems uploading when using avatar categories
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Gort
New Member

84 Posts

Posted - 21 April 2006 :  19:25:24  Show Profile
I'm using avatar categories by SiSL on top of Avatar MOD. My files will upload but they won't write to the DB:

The strCatID is not making its way into my sql statement. A response.write on the sql statements gives the following:

INSERT INTO FORUM_AVATAR (A_URL, A_NAME, A_MEMBER_ID, A_CATID) VALUES ('avatars/batman1.jpg', 'batman1', 0, )
Microsoft JET Database Engine error '80040e14'
Syntax error in INSERT INTO statement.

/board/avatar_upload.asp, line 201


Does anyone have any ideas?

Gort
New Member

84 Posts

Posted - 21 April 2006 :  19:53:43  Show Profile
I think I've narrowed the problem down to line 238:

If File.WasSuccess then File.SaveToAvatar strTablePrefix,strConnString,UploadStuff.Form("CatID"),UploadStuff.Form("destination")

But I'm not sure what's wrong. Somehow the CatID (obtained in a SELECT form element) is not being passed...
Go to Top of Page

SiSL
Average Member

Turkey
671 Posts

Posted - 21 April 2006 :  20:30:51  Show Profile  Visit SiSL's Homepage
Do you have Categories to pick which one to upload at admin_avatar_upload.asp ?

CHIP Online Forum

My Mods
Select All Code | Fix a vulnerability for your private messages | Avatar Categories W/ Avatar Gallery Mod | Complaint Manager
Admin Level Revisited | Merge Forums | No More Nested Quotes Mod
Go to Top of Page

Gort
New Member

84 Posts

Posted - 21 April 2006 :  20:42:18  Show Profile
Yes, there are three categories. Here's source code from the upload form html:
<select name="CatID" id="CatID">
<option value="5">Batman</option>
<option value="1">Misc</option>
<option value="6">Star Wars</option>
</select>
Go to Top of Page

Gort
New Member

84 Posts

Posted - 21 April 2006 :  20:44:55  Show Profile
I added a response.write to debug:
Response.Write UploadStuff.Form("CatID")
Before
If File.WasSuccess then File.SaveToAvatar strTablePrefix,strConnString,UploadStuff.Form("CatID"),UploadStuff.Form("destination")

And UploadStuff.Form("CatID") is empty
Go to Top of Page

Gort
New Member

84 Posts

Posted - 21 April 2006 :  20:56:59  Show Profile
I should also note that if I replace
strSql = strSql & ", " & strCatID
With
strSql = strSql & ", 5"
THEN it works. The problem is with strCatID...
Go to Top of Page

SiSL
Average Member

Turkey
671 Posts

Posted - 21 April 2006 :  21:24:08  Show Profile  Visit SiSL's Homepage
Around line 179, in avatar_upload.asp is the line containing strCatID like below ?
	Public Function SaveToAvatar(strTablePrefix,strDbConnection,strURL,strCatID)


Okay, yet better, can you please put avatar_upload.asp as in TXT file somewhere?

CHIP Online Forum

My Mods
Select All Code | Fix a vulnerability for your private messages | Avatar Categories W/ Avatar Gallery Mod | Complaint Manager
Admin Level Revisited | Merge Forums | No More Nested Quotes Mod

Edited by - SiSL on 21 April 2006 21:26:31
Go to Top of Page

Gort
New Member

84 Posts

Posted - 21 April 2006 :  21:37:27  Show Profile
Yes, it's there (I swapped URL and CATID during debugging):
Public Function SaveToAvatar(strTablePrefix,strDbConnection,strCatID,strURL)

Thanks for the help! I posted the .txt file here: http://www.gortner.com/board/avatar_upload.txt
Go to Top of Page

SiSL
Average Member

Turkey
671 Posts

Posted - 22 April 2006 :  06:05:50  Show Profile  Visit SiSL's Homepage
May I also request admin_avatar_upload.asp in txt, currently (except chkString(strCatID,"number")) part, I can't see difference with mine (that is working).

CHIP Online Forum

My Mods
Select All Code | Fix a vulnerability for your private messages | Avatar Categories W/ Avatar Gallery Mod | Complaint Manager
Admin Level Revisited | Merge Forums | No More Nested Quotes Mod

Edited by - SiSL on 22 April 2006 06:06:20
Go to Top of Page

modifichicci
Average Member

Italy
787 Posts

Posted - 22 April 2006 :  06:59:06  Show Profile  Visit modifichicci's Homepage
Are you sure that line has to be:
Public Function SaveToAvatar(strTablePrefix,strDbConnection,strCatID,strURL)
and not
Public Function SaveToAvatar(strTablePrefix,strDbConnection,strURL,strCatID) ?



Ernia e Laparocele
Forum di Ernia e Laparocele
Acces - MySql Migration Tutorial
Adamantine forum
Go to Top of Page

Gort
New Member

84 Posts

Posted - 22 April 2006 :  08:12:10  Show Profile
The order of those variables doesn't matter - I switched them in all the appropriate places when I was debugging..replacing chkString(strCatID,"number")) with strCatID was also part of debugging....

Here's the othe file SiSL requested:
http://www.gortner.com/board/admin_avatar_upload.txt
Go to Top of Page

SiSL
Average Member

Turkey
671 Posts

Posted - 22 April 2006 :  18:01:21  Show Profile  Visit SiSL's Homepage
Okay, here is big question:
- Which browser do you use? Or tried on both?

Because I can not see "</form>" on your admin_avatar_upload.asp since it may be problem for some browsers as a multi-part form data.




CHIP Online Forum

My Mods
Select All Code | Fix a vulnerability for your private messages | Avatar Categories W/ Avatar Gallery Mod | Complaint Manager
Admin Level Revisited | Merge Forums | No More Nested Quotes Mod

Edited by - SiSL on 22 April 2006 18:03:31
Go to Top of Page

Gort
New Member

84 Posts

Posted - 22 April 2006 :  22:16:14  Show Profile
I've now tried them on both.

I added the </form> but it didn't help.

I guess there must be some problem with the way my server is grabbing the form data. UploadStuff.Form("CatID") is empty.

I tried to follow the variable path. My ASP knowlegdge ends with simple request.form objects. The variable path: CatID (form element in admin_avatar_upload.asp)-->submit form-->UploadProcess()-->?-->UploadStuff.Form("CatID") -->File.SaveToAvatar -->strCatID added to SQL statement
Go to Top of Page

Gort
New Member

84 Posts

Posted - 22 April 2006 :  22:25:47  Show Profile
I think I have a workaround - just use strSql = strSql & ", 5" where 5 is a default category. Then I can use the avatar admin to move my avatars to different categories.

That should work....but I'm pretty frustrated I can't get your code to work when it should be work fine. It must be something out of my control...the code seems to grab input form elements correctly. Maybe it has a problem with the select form element....
Go to Top of Page

Zuel
Average Member

USA
540 Posts

Posted - 22 April 2006 :  23:11:50  Show Profile  Visit Zuel's Homepage
I don't know if it makes a difference but make sure all the variable names and forms names are consistant throughout the code. I know this makes a difference with radio buttons.

I believe IE is case insensitive while Firefox is case sensitive.

My Completed Mods: News Mod | Zuel's Avatar Add-on
In Development: World of Warcraft Member Roster | [C# Based Forum]

Note - I may take a few days to recieve your email. Hotmail filters all new emails as junk. Would be best to post all questions, concerns in a forum topic to catch my immediate attention. This way others can assist and also correct any similar mistakes.

MSN / E-Mail: ucyimDa_Ruler@Hotmail.com

Personal Bookmarks: How to work a DBS File
Go to Top of Page

SiSL
Average Member

Turkey
671 Posts

Posted - 24 April 2006 :  14:15:48  Show Profile  Visit SiSL's Homepage
I don't know what to say indeed. Pretty much ironed many different places there and as you said, last thing can tell is server side. But at least you got a work around for that. I'll recheck all of my codes again and if you send me your email, I'll directly send you my codes (however their font sizes and such a bit adjusted) but might just work also...

CHIP Online Forum

My Mods
Select All Code | Fix a vulnerability for your private messages | Avatar Categories W/ Avatar Gallery Mod | Complaint Manager
Admin Level Revisited | Merge Forums | No More Nested Quotes Mod
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.26 seconds. Powered By: Snitz Forums 2000 Version 3.4.07