cool, but weird...
I changed the line to what you suggested. If strSmileyCode is in strNewSource, then it does the Replace, otherwise it goes to the Else part.
err... I just noticed. It works when there's one smiley. But when I used a string with two smileys, I get this:
Error Type...
I am having problems with the following bit of code:
Function FormatMessage(strSource)
strNewSource = strSource
'FormatMessage = strNewSource
'Exit Function
'Response.Write "Raw message is:<blockquote>" & strNewSource & "</blockquote>"
Set rs_format =...
I just thought... does Replace replace every instance of something in a string, or just the first one? cuz if it does all then I won't need the Instr loop.
But I'll try what you said and get back to you.
[Thanks in advance|Hope I helped you]
Exodus300
[pc3]
Would somebody please point me to a decent tutorial/example of how to create an IIS Application? I've searched and searched and I can't find anything relevant.
[Thanks in advance|Hope I helped you]
Exodus300
[pc3]
Running Microsoft-IIS/5.1 on XP Pro
I'm trying to use Instr and Replace to replace each occurrence of a particular string from a message, like this:
Function FormatMessage(strSource)
Set rs_format = Server.CreateObject("ADODB.RecordSet")
rs_format.Open "SELECT * FROM Smileys", db
Do While...
Microsoft OLE DB Provider for ODBC Drivers error '80040e10'
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.
/cokeandrumisyum/menu.asp, line 59
this is line59:
59 rs2.Open "SELECT UserName, RegisteredDate FROM Users WHERE RegisteredDate = " & _
60...
Well I tried to use Response.Write "Thread ID:" & rs("ThreadID") before and after the rs.Update line, but it just shows Thread ID: with no number.
How can I get the new thread id?
[Thanks in advance|Hope I helped you]
Exodus300
[pc3]
ok i think i fixed it...
I changed the rs.Open line to:
rs.Open "Posts", conn
Now, back to my original question... after adding the record using the new code above, can I just user rs("ThreadID") to get the value in the autonumber field ThreadID?
[Thanks in advance|Hope...
OK I used rs.AddNew on an existing, working page using the old method. I changed the code to this:
<%
Set conn = Server.CreateObject("ADODB.Connection")
Set rs = Server.CreateObject("ADODB.RecordSet")
conn.Open "DRIVER=Microsoft Access Driver (*.mdb);DBQ=" &...
Hi,
I'm trying to make a message forum using ASP. I have two tables in my database:
Threads (ThreadID, Title, StartedBy, StartedDate, StartedTime)
Posts (PostID, ThreadID, PostedBy, PostedDate, PostedTime, Content)
ThreadID (Threads table) and PostID (Posts table) are the primary keys; both...
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query.
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "DRIVER=Microsoft Access Driver (*.mdb);DBQ=" &...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.