|
-
Asp forum......................
At the mo i'm trying to make my own forum sorta thing. It sort of works at the moment but i do have one major problem.
(BTW this is more of a test than a useful thing at the moment)
Anyway I have an access database which has stored queries in it to add and select posts/messages.
But when i try to post a message that's a certain size it doesn't work. I either get a general SQL error, or it adds the new record but just fills the fields with random crap, or sometimes adds bits but not others.
There doesn't seem to be one thing defining when it happens but if i delete some of the message it then works.
As far as I know there is no validation on the memo field in question, or the query but i may have missed something (i doubt it tho).
Anyway I can provide a lot more info if anyone thinks they may be able to help.
You can take a look at what I have done @ www.steamingturdforums.cjb.net
I wanna start adding a nice design on to it, but I've gotta get it to work first.
Also if when posting/testing anyone notices any other probs let me know.
Thanks!
Will
------------------
Microsoft has acknowledged that its engineers substituted certain file names with the phrase, "Netscape engineers are weenies," in some of its internet software.
Oh well now we all know why Nutscrape is so crap!
Bygones!
You only Die once
-
Ex-***
Well it seems to work OK, but whats that zero above the poster name? Other than that, a redirect on the "thanks for posting" -page would be handy. Also, are you not going to have a user database (login)?
Bar those questions, it looks like most of what remains is mostly cosmetics.
------------------
Now listening to:
Xploding Plastix - Amateur Girlfriends Go Proskirt Agents
Now listening to various rock and metal
143rd member to join Sharkyforums.
-
The number above the name will respond to emoteicons/smilies when I get round to it.
When i get this prob fixed the redirect will go on.
I have a login system all tested and up and running used for something else. I will integrate the 2 of them soon. I've also got quite a few more ideas but i need the damn thing to work first.
Try posting about 200+ characters you'll see what I mean! It's got me quite confuzzled.
Will
------------------
Microsoft has acknowledged that its engineers substituted certain file names with the phrase, "Netscape engineers are weenies," in some of its internet software.
Oh well now we all know why Nutscrape is so crap!
Bygones!
You only Die once
-
you might have the wrong data type in your db. use "memo" in access for BLOBs.
the site crashed when I tried to post. huh.
-
I am using a memo field (checks to make sure he's not being dumb again!).
Whatd'ya mean the site crashed?
It didn't crash ur browser did it?
Or do u just mean a http500 error (or the real error behind that)?
------------------
Microsoft has acknowledged that its engineers substituted certain file names with the phrase, "Netscape engineers are weenies," in some of its internet software.
Oh well now we all know why Nutscrape is so crap!
Bygones!
You only Die once
-
no, it just wouldn't load. it finally did.
You should take that error massage and search for it on MSDN.
good luck.
-
Originally posted by 13kft:
no, it just wouldn't load. it finally did.
You should take that error massage and search for it on MSDN.
good luck.
Ahh thats just brinkster being an arse.
The problem is the error it gives is
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC Microsoft Access Driver] Invalid SQL statement; expected 'DELETE', 'INSERT', 'PROCEDURE', 'SELECT', or 'UPDATE'.
Which afaik pretty much means nothing apart from there is something wrong with what i'm entering and i already know that!
------------------
Microsoft has acknowledged that its engineers substituted certain file names with the phrase, "Netscape engineers are weenies," in some of its internet software.
Oh well now we all know why Nutscrape is so crap!
Bygones!
You only Die once
-
Help....someone, anyone, please 
------------------
Microsoft has acknowledged that its engineers substituted certain file names with the phrase, "Netscape engineers are weenies," in some of its internet software.
Oh well now we all know why Nutscrape is so crap!
Bygones!
You only Die once
-
Trying to get to your site now, but I noticed you said it's Brinkster, and having a couple of sites there myself, I know how long it can take to respond. Maybe you could either put a limit on the number of characters in your textbox field. One other thing I can think of, which I will test soon, is that maybe the single quote is causing a problem. When you do a response.write strSQL (or whatever you call your SQL string), what does it look like? Could you post your form submission code?
Originally posted by Wollington:
Help....someone, anyone, please 
------------------
"My other car is also a Porsche"
-------------------------
Abit BH6, rev. 1.01
PIII-750@931
256MB PC133 Crucial RAM
Hercules Prophet 4500
Diamond Monster MX300 w. Vortex 2 v.2048 drivers
DirectX 8.0a
"My other car is also a Porsche"
-------------------------
PIV-3.0GHz, 800MHz FSB; 1GB 400MHz SDRAM; Ati Radeon 9800 Pro; SB Audigy 2; Windows XP SP1
Old rig: Abit BH6, rev. 1.01; PIII-750@931; 256MB PC133 Crucial RAM; Hercules Prophet 4500; Diamond Monster MX300; DirectX 8.0a; 60 GB IBM Deskstar 60XP
-
I did have the problem with the single quote when i first made it but i put a Replace() in to change from ' to ` which solved that one.
If I have to limit the message to about 200-300 characters its really not gonna be of much use. I just don't see why it won't accept it.
Here is the SQL statement from the query in Access:
INSERT INTO tblMessages ( PostID, Emote, Message, ReplyBy, ReplyOn, IP )
SELECT [@PostID], [@Emote], [@message], [@Replyby], [@ReplyOn], [@IP];
I'll try that response.write idea later. Ooh and I'll put all the code up in txt files aswell.
Thanks
Will
------------------
Microsoft has acknowledged that its engineers substituted certain file names with the phrase, "Netscape engineers are weenies," in some of its internet software.
Oh well now we all know why Nutscrape is so crap!
Bygones!
You only Die once
-
I've added the Response.Write bit and tested it. It writes out exactly what goes in and is correct to be entered into the DB. So its the SQl stored query or database that is causing the probs, as I thought.
Any ideas as to what it could be then?
Will
------------------
Microsoft has acknowledged that its engineers substituted certain file names with the phrase, "Netscape engineers are weenies," in some of its internet software.
Oh well now we all know why Nutscrape is so crap!
Bygones!
You only Die once
-
Have you tried screaming at your computer?
I would ditch the stored queries and put a SQL statement directly in your vbScript. See if that works. I dunno. Just a guess.
-
I came across a similar problem when I was doing a school project this summer. I didn't realize it at the time, but very slight differences in the syntax of the SQL statement were screwing the whole thing up.
I had a search page that took the users input and formed a sql statement with some client side Java scripting. This string was then passed into my asp function that displayed the correct records. Even when the string that I was assembling with the Javascript was the EXACT same as the one automatically generated by access I wasn't getting anything but the error message you list. I had to try many different forms of the SQL statement to find one that would work. I'm telling you this to let you know that I don't know what is going wrong, but there is definately something wierd about the way that the SQL statements work on a JET (access database).
In conclusion, I'm not really sure what's going on from your description but if you'll send me the code I'd be glad to look it over to see if I can find the problem. I fixed my problem through alot of patience and fear of failing a class.
Later,
Mike Crutcher
-
This is the asp page which collects the data from the form and forwards it to the stored query in the DB. (Yes I know its a bit of a mess! it isn't my final one!)
<%
Dim conn
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("****.mdb") & ";PWD=****"
Dim forumid, emote, subject, postedby, postedon, message, ip, postid, all1, all2
forumid = Request.Form("forumid")
emote = 0
subject = Request.Form("subject")
subject = Replace(subject, Chr(39), Chr(96))
postedby = Request.Form("name")
postedby = Replace(postedby, Chr(39), Chr(96))
postedon = Request.Form("dt")
message = Request.Form("message")
message = Replace(message, Chr(39), Chr(96))
message = Replace(message, Chr(10), "<br>")
ip = Request.Form("ip")
all1 = forumid & ", " & emote & ", ' " & subject & " ', ' " & postedby & " ', ' " & postedon & " ' "
Dim strSQL1
strSQL1 = " qryAddPost " & all1
Dim RS1
Set RS1 = Server.CreateObject("ADODB.Recordset")
RS1.open strSQL1, conn
Dim strSQL2
strSQL2 = "SELECT PostID FROM tblPosts WHERE Subject = ' " & subject & " ' AND ForumID = " & forumid & " AND PostedBy = ' " & postedby & " ' AND PostedOn = ' " & postedon & " ' "
Dim RS2
Set RS2 = Server.CreateObject("ADODB.Recordset")
RS2.open strSQL2, conn
postid = RS2("PostID")
RS2.Close
Set RS2 = Nothing
all2 = postid & ", " & emote & ", ' " & message & " ', ' " & postedby & " ', ' " & postedon & " ', ' " & ip & " ' "
Dim strSQL3
strSQL3 = " qryAddMessage " & all2
Dim RS3
Set RS3 = Server.CreateObject("ADODB.Recordset")
RS3.open strSQL3, conn
Conn.Close
Set Conn = Nothing
Response.Write "Thanks for Posting!<br>"
Response.Write "<a href='showmessages.asp?forumid=" & forumid & "&postid=" & postid & " '>Click to continue</a>"
%>
Err I think that's all u need right?
I can post/send anyone any/all bits of it.
------------------
Microsoft has acknowledged that its engineers substituted certain file names with the phrase, "Netscape engineers are weenies," in some of its internet software.
Oh well now we all know why Nutscrape is so crap!
Bygones!
You only Die once
-
Like someone else mentioned earlier, try using a simple INSERT INTO statement rather than using the stored procedure.
------------------
"My other car is also a Porsche"
-------------------------
Abit BH6, rev. 1.01
PIII-750@931
256MB PC133 Crucial RAM
Hercules Prophet 4500
Diamond Monster MX300 w. Vortex 2 v.2048 drivers
DirectX 8.0a
"My other car is also a Porsche"
-------------------------
PIV-3.0GHz, 800MHz FSB; 1GB 400MHz SDRAM; Ati Radeon 9800 Pro; SB Audigy 2; Windows XP SP1
Old rig: Abit BH6, rev. 1.01; PIII-750@931; 256MB PC133 Crucial RAM; Hercules Prophet 4500; Diamond Monster MX300; DirectX 8.0a; 60 GB IBM Deskstar 60XP
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|