I have a replace function which should replace a smiley tag with the HTML for the smiley image.
can you tell me where this is going wrong please?
Code:
FUNCTION insertSmilies( tempString )
tempString = replace(tempString,":D ", "<img src=""images/smilies/icon_biggrin.gif"" width=""15"" height=""15"" class=""subScript"" /> ")
insertSmilies = trim(tempString)
END FUNCTION
I want to use the instr function, but return results from it depending on surtain functions, I can't realy explain so I'll show my example:
I have a string in wich some word I want to find might be in diffrent Capital Letters order, I want the Instr function to return all the values of the place of that word (avcourse I'll run a for and increase the starting point of the Instr func until it returns 0). The instinct thought is to use the Lcase or the Ucase functions, but in this case I don't know how to use them. In the same Idea I wanted to use the Instr Func with the trim Func, But Its realy the same principle if I just understood how to do so.
I'm just trying to display a user's FIRST name and the FIRST INITIAL of the last name on my asp web page. This works to displays their "firstName" and "lastName":
Code: <%=oUsers("firstName")%> <%=oUsers("lastName")%> But I get a variety of vbscript or asp syntax errors when I try to trim the "lastName" using something like
Code: <%=oUsers("firstName")%> <%=oUsers(replace(left("lastName",1))%> How do get this simple task done?
(If it makes any difference, the whole thing is inside html <td></td> tags as part of a table)
The WHERE part of my select needs to pull out where the date column is empty. If there isn't a date, it shows NULL in the database (SQL7)."WHERE eligibility_dt <> NULL" doesn't work. what am i forgetting?
I believed that there is a wrong syntax on the window.open line...Can anyone spot it ? Code: strLocation = "Sch_As_FollowAct.asp?drvid=" & request("drv") & "&u=" & uday(0)
i am having some trouble rembering the correct syntax for a If Then Statement here is my code.
<% If Request.QueryString("access") = "false" Then %> <tr> <td colspan="2" bgcolor="#FFFFFF" class="mediumRed">The User ID and Password combination has failed.<br> <br> Please try again.</td> </tr> <% Else If rsGettblCouples.Fields.Item("StopDate") = "1/1/1900" Then %> <tr> <td colspan="2" bgcolor="FFFFFF" class="mediumRed"> The User has already<br> completed the online scoring.<br>Please Contact your facilitator.</td> </tr> <% End If %> <% End If %>
Can someone direct me a set of rules for building strings in ASP? I'm always getting stuck on when to use a quote (") or apostrophe{'} or both. This simple string is giving me fits...
I want to update multiple rows in an SQL table. Presently, it's populating all rows with the same data based on the first row. It's not looping through all records one at a time. Is this the correct syntax.
<% rsOD 'recordset up here %>
<% Dim DataConn1 Set DataConn1 = Server.CreateObject("ADODB.Connection") DataConn1.Open MMSTRING Do While Not rsOD.EOF 'SQL UPDATE statement here DataConn1.Execute(SQL) rsOD.MoveNext Loop %>
Another slight problem with syntax of asp, basically I'm pulling an image file name from my database (image1.jpg) and using the images directory on my web server to display my picture, make sense? Code:
If you haven't noticed I am novice and have just started getting back into the world of ASP. First question can I have two And statements, and second the syntax is wrong with my And statements where can i find a reference to see the proper syntax. Code:
I just decided to leave Mssql and start using Mysql. I am having some problems with my queries; is there anyone here who has a knowledge of query syntax in Mysql?
I'm using an Access database file for this. I can issue SELECT statements on the database, but for some reason it says I have a syntax error with my UPDATE statement. Code:
openAccessRS("UPDATE students SET password='test' WHERE sid='123456789' AND email='google@yahoo.com'")
Don't worry about the openAccessRS function. It just takes the query and issues the ADO.RecordSet.Open function. I have the students table filled with the correct information. I do have an entry where the student id (sid) is 123456789 and email = google@yahoo.com.This query worked fine in a MySQL DB.
Microsoft JET Database Engineerror '80040e07'Syntax error in date in query expression 'fldUserName= 'muratsa' AND fldTimeIn=#01.09.2003 16:52:20# AND fldOffline=0'. /Vestelweb/logout.asp, line 7
I am using the Now() function to get the date in db the format is general date and in regional settings of the server the seperator is "."
My asp syntax is very lacking, it seems the double quotes that have been done by me are not what asp is looking for. Anyone that could correct my faulty thinking would be thanked.
Could anyone tell me what is wrong with this SQL statement:
sqlInsertShow = "INSERT INTO tblShowings (date) VALUES (#12/12/2004#)"
Im trying to inder this into an MS Access database, and the field name DATE, is set to date/time value.The error message I get is:
Error Type: Microsoft OLE DB Provider for ODBC Drivers (0x80040E14) [Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement. /fyp/backend/add_show_03.asp, line 41
Ive been scratching my head over this for AGES now! It just will not work.
I am trying to update an Access database using an ASP form with a date. All I return is a custom error telling me there is a syntax error with the field