Incorrect Syntax Near ')'.
StrSql = "SELECT * FROM [" & Screen & "] WHERE (CPN="&(COORDID)&") AND (CNUM="&(CNUMQS)&")
View RepliesStrSql = "SELECT * FROM [" & Screen & "] WHERE (CPN="&(COORDID)&") AND (CNUM="&(CNUMQS)&")
View RepliesI get this error with this sql statement in MSSQLincorrect syntax near '' ?
this is part or the sql statement:-
ORDER BY Sum([Ratings].[Rating])Count([Ratings].[RatingID]) DESC
I converted my Access databases to MS SQL. I then changed the code in my ASP pages to compensate. I wanted to check that it would work. I ran into a problem: It keeps saying:
[Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near the keyword 'User'.
BTW this piece of code works fine in Access and only crashes when using SQL. Can't find anything relevant on the Internet. Can someone help please? Code:
When i insert some values float in a form made with ASP appear an error message like this:
Microsoft OLE DB Provider for SQL Server (0x80040E14)
Line 1: Incorrect syntax near ','.
sql="select id from tbl_monete where id_taglio="&idtaglio
rs1.open sql, conn
idTaglio it's the value of money that can be like 0,5 0,2,
0,1 etc etc
If i try one or two times it'll work correctly, why?
Table tbl_monete has field id_taglio that is float.
I need from an Access database using ASP. Everything I need can be found in the database, but it is scattered among different tables. Here's the situation:
Currently many tables exist, one for each event. Each table contains participants and results. Each table is for only one venue, but many tables for the same venue may exist (different events at the same location on a different date).
I need a table of participants that automatically updates if a new participant is found.
I need a table of venues that automatically updates if a new venue is found.
I need to be able to show a particpant's results at any given venue for any given time period. Code:
Recently i noticed that there was an incorrect piece of data displayed in a
page and after investigating i noticed that it belongs to another sessionkey.
Have you experienced anything like this? i.e. when you retrieve the
sessionkey from the session variable, you get a different one?
Getting this error:
[vbs]Microsoft OLE DB Provider for ODBC Drivers error '80040e10'
[Microsoft][ODBC Microsoft Access Driver]COUNT field incorrect
/admin/articles.asp, line 277
[/vbs]
On this line:
SQL="UPDATE article SET title='" & request.form("title") & "',topic= " & request.form("topic") & " ,article_text='" & request.form("article_text") & "' WHERE title='" & request.form("hidden") & "'"
When it is just one line coming from the article_text thing it works fine, when it is several lines it gives this COUNT error...
my problem is the FormatDateTime function it is changing the date format to MM/dd/yyyy but we need dd/MM/yyyy. We already changed the settings for the administrator user. Access the regedit tool and change the format to dd/MM/yyy on all the users on the server but we are still getting the incorrect format.
First we got for every case the format switch. For example we ask for this FormatDateTime("01/10/2003",2) Octuber 1st, 2003 an the result was "10/01/2003" January 10th, 2003
for days lower than the 12th and even if we send FormatDateTime("31/10/2003", 2) we got "10/31/2003". The server is running Windows 2000 Advanced Server with IIS 5.0
After some changes this is what is happening know
FormatDateTime("01/10/2003", 2) -- > 10/01/2003
FormatDateTime("31/10/2003", 2) -- > 31/10/2003
When I do testing with a test post page, everything functions properly. When
the actual customer does the post, the attribute following the "file"
attribute is concatenated to the file itself. When I execute the
HttpPostedFile.SaveAs(), the resulting file is what is sent Plus the
following form attribute. This following attribute is not in any Collection
from the Request object. Code:
I'm using a binary stream to send down a file with ASP from the web
server. I've been having trouble with IE and getting it to recognize
my file. I've added the filename as a paramater(?filename=file.jpgw)
to handle IE's mime type mangling, but I'm still having trouble with
IE's default Save As Type being HTML.
When we send down a jpgw
(geo-jpeg) file IE wants to save it as an HTML file. I've got the
correct filename showing in the Filename box, and if I choose the All
Files option from the Save As Type drop down then the file is saved
with the correct extension. I'd like to have the All Files option
choosen by default. I know it's just a couple of clicks but we have
some noivce users that can't seem to get that.
I am storing dates in a database. WHen i come to do sql queries on the dates access is interpreting them as US format (mm/dd/yyyy). When the date is stored in the db it is in the correct uk format (dd/mm/yyyy) but when asp passes the queries to access the date format changes if the day is above 13.
For example if the date being searched is 10/2/2006 (10th feb 2006) it is searching the database for 2nd October 2006. If the i pass is 13/02/2006 (13th feb 2006) it searches it correctly.
I have tried setting the session.lcid to 2057 but this makes no difference. I read somewhere that access automatically treates dates as US format and only tries another format if the us format doesnt make sense. Is there any way around this?
I have two dynamic listboxes.One is a date and needs formatting.I am using DWMX and therefore used the format function within the dynamic listbox wizard.When I run the page the listbox without formatting is ok, but the date listbox returns the following:
Microsoft VBScript runtime error '800a000d'. Type Mismatch 'DoDateTime' /admincontacts.asp, line 189
Line 189 is the following:
<option value="<%=(rsAdmin.Fields.Item("Date_Added").Value)%>" <%If (Not isNull(DoDateTime((rsAdmin.Fields.Item("Date_Added").Value), 1, 4105))) Then If (CStr(rsAdmin.Fields.Item("Date_Added").Value) = CStr(DoDateTime((rsAdmin.Fields.Item("Date_Added").Value), 1, 4105))) Then Response.Write("SELECTED") : Response.Write("")%> ><%=(rsAdmin.Fields.Item("Date_Added").Value)%></option>
we have just migrated to a new server both with database and web server-
migrating all web projects and all databases.then we decided to rename the
new server.we tried running all web projects on the new server but it doesnt
work causing error "configured identity incorrect, check username and
password" in a certain line in the code.
i have searched for possile solutions like synchronizing identity account in
the 3 locations where this account is stored but it seems it doesnt work.
Earlier i was able to fix scheduled jobs in the database not working caused
by renaming the new server which is also the name of the database server.But
problems in the web files itself (asp) are giving me headache particularly in
code lines with "createobject."
Whats seems to be the particular problem?Can anyone point me to the right
resources to fix this prob?
I have all of the dates I use in my tables stored as date in the YYYY/MM/DD format, with the columns set to DATE.
When I do any queries on the database (not usinf ASP) I get YYYY/MM/DD format returned.
When I do a recordset("datefield") ASP request I get D/M/YYYY returned. I have not asked anything to convert it, I have no idea where it is getting converted. It is a real pain, as I need to copy these dates through out the table, and they are getting returned in the wrong format.
I have used xmlHTTP to grab a page from a server.. The page has the '£'
symbol in it, when it get to my site it is displayed as a '?'.. I have tryed
replace every way I know and it does not swap back..
I have tryed replace "?" , "£"
I have tryed chr(63) , chr(163)
I have tryed "?" , £
nothing works, except it does change the real '?' on the page, I mean the
'?' that started out as '?' and not as '£'
if I right a bit of code to count the '£' on the page it get the total right
including the original '?' and the '?' that are supposed to be '£'.. I dont
understand it I can count them by saying if {loopchr} = chr(63) but the the
chr(63) does not work in a replace statement..
I have examend the feed from theXMLHTTP and they are or seem to be got a '?'
and yet I cant replace them
I have IIS 5.0 running on a Win2000 server. I have
scripts that I want to run on the web page. It was
suggested to me to create an .HTA page instead of .asp
or .html to make them run. The scripts now run fine, but
when the action is finished, I get the error:
The page cannot be displayed
The page you are looking for cannot be displayed because
the page address is incorrect.
HTTP 405 - Resource not allowed
after completing a task associated with a button press,
in this case a folder copy!
I'm not very familiar with .hta pages, can someone help
me with why I might be getting this error. Are .hta
pages supposed to be used with newer version of IIS
instead of 5.0
From Page1.asp, I use "Server.transfer" to "REDIRECT" to another asp page
(page2.asp),
in page2.asp I use Request.ServerVariables("URL") and
Request.ServerVariables("REFERER") to get the lastpage and the actual page,
this method (or property) return incorrect values: "Page1.asp" and ""
Why?
Can I use this syntax
Where NOT IN (".....)
in a situation I don't want to select items in the list.
If not what other ways can do that.
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)
I can't see to find where the syntax is wrong because I can do the query just fine in access but my asp page gets this error
Microsoft JET Database Engine error '80040e14'
Syntax error in INSERT INTO statement.
Here is what the insert looks like when I print it out in the page
INSERT INTO tblusers (username,password,[Timestamp],email) VALUES('testuser', 'c4ca4238a0b923820dcc509a6f75849b', '10/16/2004', 'me@home.com')
Here is the code:
I am trying to query a database for 2 conditions but I can't get the query to work.
Can anybody see a problem with this line of code?Code:
strQuery="SELECT Count(*) AS intTotal FROM tbl_artists WHERE fld_artist_name = '" & strReqname & "'" "AND fld_user_id ='"& strUsername & "'",objConn,,,adCMDText
objRS.Open strQuery,objConn,,,adCMDText
numRecords = objRS("intTotal")
I have a textarea and have named it category_One.
I have sent the data in this form on using the POST method
contents_category_One = Request.Form("category_One")
I have then used the following sql statement
sql = "INSERT INTO tableName(Category_One) VALUES ('"& contents_category_One &"');"
If someone inserts ' in the text box, this value is causing a syntax error in the sql statement.
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?
View Replies View RelatedI need help with ASP. when i post data to the database, do the records in my form need to be in the same amount as the database records?
View Replies View RelatedWould anyone have some syntax for a query (SQL2000) that would return results for records that are over 24 hours old (date field is smallDateTime)?
View Replies View RelatedI 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)
response.write "<script>" & vbCrLf
response.write "window.open('" & strLocation & "' & ",menubar=1,resizable=1,width=350,height=250");" & vbCrLf
response.write "</script>"
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...
Response.Redirect("test3.asp?orderno='" &
(rsProducts.Fields.Item("OrderNo").Value) & "')"
I can't seem to get the right combination.
What's wrong with the syntax in this connection string? It's a DSN less connection to an Access DB.
<%
Set Conn = Server.CreateObject("ADODB.Connection")
MM_GenKAccess_STRING = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & _
Server.MapPath("authors.mdb") & ";" & _
Jet OLEDB:Database Password=48912; & _
Jet OLEDB:System database=" & Server.MapPath("system.mdw") & ";" & _
conn.open MM_GenKAccess_STRING
%>
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
%>
Can any one tell me why this snippet is not showing the a href correctly. Sorry, not sure of ASP syntax as yet...
Response.Write Highlight(myTextwo, "", "", "<a href=""url.com=" & CInt(rsrch("tablcolumn")) & """ target=""_blank"">" & rsrch("othercolumn")) & "</a>"
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:
View Replies View RelatedI believed that there is a wrong syntax on the window.open line. Can anyone spot it?
strLocation = "Sch_As_FollowAct.asp?drvid=" & request("drv") & "&u=" & uday(0)
response.write "<script>" & vbCrLf
response.write "window.open('" & strLocation & "' & ",menubar=1,resizable=1,width=350,height=250");" & vbCrLf
response.write "</script>"