Mysql Syntax Problem

I have an ASP aplication (which isn't written by me), connected to an Access Database, but recently they asked me to change it to MySQL.

Although i'm a newbie in this matters of dinamic pages, I was able to configure "almost" all the ASP programation to work correctly with Mysql. But i have a single problem which is: Code:

View Replies


ADVERTISEMENT

Mysql In Asp Syntax Prob

i got this line before:

mySQLde="UPDATE crmagents SET online=NULL WHERE online < DATE_ADD(LOCALTIME(),INTERVAL -20 MINUTE)"
connasa.execute(mySQLde)

it working perfectly! it was nulling all the records older than 20min

but i needed to add the nulling opration of the fields on the second table than i wrote this Code:

View Replies View Related

SELECT Syntax In MySQL

Could anybody tell how this query statement looks like in MySQL syntax?

SELECT (Left(TAB1.Field1,InStr(TAB1.Field1,"-")-1)

I have a field containing Styles such as 1010-10, 1010-20, 5050-40, LS7856-10, 7856, 9090. I need select and group them by the part which is before "-". In Access it was pretty easy but in MySQL syntax error appears.

View Replies View Related

Use Mysql With VB6

I am trying to connect to a Mysql database in the following manner:

Dim conn As ADODB.Connection
Set conn = New ADODB.Connection

Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset

conn.CursorLocation = adUseClient
conn.ConnectionString = "DRIVER={MySQL ODBC 3.51 Driver};SERVER=myserver;PORT=3306;DATABASE=mydatabase; USER=myusername;PASSWORD=mypassword;OPTION=3;"

however I am getting an error:

visual basic run-time error microsoft [odbc driver manager] data source name not found and no default driver specified.

View Replies View Related

C# Asp Mysql

How do you add data to the tables from asp website using C# (for mysql)

View Replies View Related

Mysql With ASP

Our website is currently developed in ASP/Mysql 4.
The dedicated servers on which it is currently hosted arrive at saturation.
Here is their configuration:
- 1 server PIV 2,8Ghz 1GB RAM with IIS 5 on Windows 2000
- 1 server Bi-xeon 3Ghz, 512 MB with MySQL 4 on Windows 2003
The website makes approximately 10.000.000 of pages seen and 310.000
visits each month (given by an external statistics tool), increasing by
10% each month.
The database is approximately 60 MB.
I made, I think, most of the optimizations on the database (cache,
indexes...).
According to our current web hoster, this saturation is due to a bad
management of connections between ASP and MySQL and recommends to us:
1/ to put the site on Windows 2003/IIS 6.
2/ to change our database from MySQL to SQL Server.
3/ to change our PIV to a second Bi-xeon.

View Replies View Related

VB And MySQL

er...i dont know if this belongs in here, so apologies if it shouldnt...

Im working on a programme in VB6 that allows people to add news to my site. I was just wondering how can you connect to MySQL with VB and how can you add records

View Replies View Related

MYSQL And ASP

i need to compare against the database if the user input the correct username and password otherwise to send the user to another page.. but still lets sign in even if the username and password does not match.. here's an example of my code:

View Replies View Related

MySQL With ASP

I was having trouble with access because it was far too slow and the site kept crashing as too many people were accessing the database at the same time (servers errors because of the lock file kept cropping up).

So, I converted the Access Database to mySQL, used the connection string:

Conn.Open "DRIVER={MySQL ODBC 3.51 Driver};database=dhsweb;server=localhost;uid=root;password=chadwick;option=3;"

And it connects ok. However, I get the following error on the main page: Code:

View Replies View Related

ASP & Mysql

How can i make ASP read a table and view its content from mysql ?

any xamples or a site i can refer to ?

1 more thing .. how to view the Database entries as URL or Links ?

View Replies View Related

ASP With MySQL

I am trying to create a website in ASP with a database back-end.

I am ok when using MS Access, but I have recently read articles saying that Access is no good for dealing with multiple users accessing it at the same time, so I am worried that it will not be able to cope.

As an alternative, I am looking at MySQL.

I am completely new to MySQL, and even installing it seemed complex. I have installed it to the directory C:mysql, and using 'mysql front' I have managed to create a database with a few tables.The database is in the 'data' subdirectory along with the mysql database. Code:

View Replies View Related

Using MySQL

I have a not so now small application where I am using an Access database as the backend and ASP. Since the size of the database and the complexity of the app are growing I am looking for a "stronger" database.

I have checked MSSQL but can't afford it, that's why I am thinking to use MySQL instead. Do you have any experience using classic ASP and MySQL, comments, etc.?

View Replies View Related

IIS Vs PWS W/ MySQL

I'm working with MySQL both locally and on a live server but empty text (memo) fields error out (Exception) when on PWS but not IIS. -Even if I'm just checking to see if there's a value (if rs("mytxtfield") <> "" then..)

Both are win2k boxes (Pro vs server) with the same drivers (3.51)

I've googled it, but no luck. Has anyone else run into this or is it just me?

View Replies View Related

ASP And MySQL 4.1.21

I'm trying to connect to a MySql datbase, which is version 4.1.21. This is the connectionstring I am using: Code:

strConnectionhg = "driver={MySQL ODBC 3.51 Driver};server=67.159.10.***;uid=dan_anope;"
strConnectionhg = strConnectionhg & "pwd=******;database=dan_anope"

However, whenever i run this script, I get the error:
[MySQL][ODBC 3.51 Driver]Client does not support authentication protocol requested by server; consider upgrading MySQL client

I've used the exact same script on MySQL 5, and it works perfectly. So what must I change to make it work on 4.1.21? it's not possible for me to upgrade the MySQL client.

View Replies View Related

ASP And MySQL

I'm using PHP. So, i want exporting my Data to Word or Excel. However, PHP can't. And i must write one ASP page to do it. and ASP can connecting to mySQL ?

View Replies View Related

Mysql

asp is compatible with MySQL as a backend? Further can anyone also help provide me user groups for MySQL? Is PHP a better option than ASP?

View Replies View Related

Where NOT IN ( ) Syntax

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.

View Replies View Related

Syntax Help

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")%>&nbsp;<%=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")%>&nbsp;<%=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)

View Replies View Related

SQL Syntax

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:

View Replies View Related

SQL Syntax

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")

View Replies View Related

SQL Syntax

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.

View Replies View Related

SQL Syntax

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 Related

ASP Syntax

I 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 Related

Sql Syntax

Would 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 Related

Syntax,JS

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)

response.write "<script>" & vbCrLf
response.write "window.open('" & strLocation & "' & ",menubar=1,resizable=1,width=350,height=250");" & vbCrLf
response.write "</script>"

View Replies View Related

If Then Syntax

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 %>

View Replies View Related

Syntax 101

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.

View Replies View Related

Dsn Less Syntax

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
%>

View Replies View Related

Do While Not - Syntax

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
%>

View Replies View Related

Syntax Of URL

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>"

View Replies View Related

Syntax ASP

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 Related

Syntax Err,JS

I 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>"

View Replies View Related

SQL Syntax

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:

mySQL= "SELECT tbl_Sch.Schedule_id, tbl_Sch.TeamId, tbl_Sch.GameDate, tbl_Sch.GameDescription, tbl_Sch.GameTime, tbl_Sch.GameStatus, tbl_Sch.Season, tbl_team.TeamID, tbl_team.Team_Name, tbl_team.Enabled" _
& " FROM tbl_team, tbl_Sch " _
& " where tbl_team.TeamID = tbl_Sch.TeamId" _
& " And tbl_team.Enabled = '"-1"' " _
& " And tbl_Sch.Season = '"2005-FAL"' ;"

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved