Mysql Insert And Select Problem

I have 2 simple seperate .asp files :

1 to insert a record a record into a mysql database-table.
1 that reads the database-table and displays the records.

When I call them in seperate browser-windows, everything works fine.
The problem rises when I use a menu-page and call the pages in an IFrame in the same browserwindow.

The newly added records from the form-frame, do not show up when I call the display frame.

I have to close my browser and reopen it to see the new records.
There are no error-messages given. Code:

View Replies


ADVERTISEMENT

MySQL SELECT Statement

Got a slight issue with a SQL SELECT statement n the slight issue being it kicking a error.

sql = "SELECT O2, Vodafone, Orange, T-Mobile, details1, details2, details3, details4, details5, details6, Type, Price, SimcardsID, Make, Model FROM Simcards"

Thats my SQL statement and the error is:

[MySQL][ODBC 3.51 Driver][mysqld-3.23.49-nt]Unknown column 'T' in 'field list'

I tried stickin [] around the T-Mobile field and it then kicks:

[MySQL][ODBC 3.51 Driver][mysqld-3.23.49-nt]You have an error in your SQL syntax near '[T-Mobile], details1, details2, details3, details4, details5, details6, Type, Pr' at line 1

The line works nicely offline (access database) just not when uploaded.

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

Confirmation Of INSERT In ASP/MySQL

I wrote an ASP prgram to insert a row into a MySQL database using data from a form. It works just fine, however is there a way to check a return code and trap any error that may occur (duplicate row error for example) so I can format and display a message in the browser instead of having the error just show up?

I've been looking in my ASP & MySQL books and searching on the web but can't find anything that sounds like what I want to do.

View Replies View Related

Insert Into MySQL Datetime Issue

i have the following insert statement:

varSQL = "insert into messageCenter(sender,recipient,title,message,sent, ack) values(" & request.form("sender") & "," & request.form("recipient") & ",'" & request.form("title") & "','" & request.form("message") & "','" & now & "'," & 0 & ")"
oConn.execute(varSQL)

for whatever reason, the "sent" field is always blank. it is set to "datetime" in the MySQL DB.

View Replies View Related

Insert Data Into Mysql Fields

I'm writing ASP/mysql apps, and I'm almost clueless about mysql. Can someone tell me how to insert data into fields using ASP? Code:

View Replies View Related

DateTime Insert From String MySql

I have a form that collects the date and time of an event. I create a string to hold all of the data in the correct format for MySQL and it (the string) looks like this...

2007-03-03 17:30:00

I am then using CDate to convert the string to a DateTime type.

and since I am in the US it gets converted like this...

3/3/2007 5:30:00 PM

per my regional system settings...

I grabbed this code from the forums here which I have used before... Code:

View Replies View Related

ASP - Date Formating MySql Insert/update

I am storing dates in a mySql database in the format yyyy-mm-dd. Now, I have set up so that this field is insert by a form.

It isn't very user friendly to have to type yyyy-mm-dd, how can I set up so that the user can enter format dd/mm/yyyy and it will automatically insert into the database as yyyy-mm-dd? I am using Dreamweaver MX 2004 and ASP.

View Replies View Related

Basic Code To Open, Select And Close A MySQL Database

I am looking for the basic code to open, select and close a mySQL database using asp code. I am experienced in php and have a site using php to access this database but this client would like one page using asp.

View Replies View Related

Select And Insert Using Asp

I have an LDAP query from asp working correctly. It is returning data fine. Now I need to know how to take this data and then submitt it into the database. Can this be done in
one page and is there any other way to do this without putting a submit button on a page.

Almost like a file that I can pass to the user and he can click it to insert into a database. My way of do it is to simply to put a submit button on the page and when the user hits submit the values selected will go to the database. However the only thing on this page is a submit(kinda useless).

View Replies View Related

Insert/select Statement

How can i get the autonumber(primary key value) from the specific rows when i just insert it.Example

i just insert the member information.
sql="INSERT IMTO register(user,password,address) VALUES (shujuan,841218,singapore)"

so how can i get the autonumber value for this row after i just create it.

View Replies View Related

GetRows And Insert/Select Statements

I'm using an SQL statement like the following:

Code:

INSERT INTO table (field) VALUES (value) SELECT @@IDENTITY AS NewIdent;

If I run it through a command prompt (osql.exe) it works fine - it inserts the data and returns the new identity. However, when I try to pass this through my nifty GetRows() function the stupid thing chokes (it acts like a normal INSERT statement has been passed - "ADODB.Recordset (0x800A0E78) Operation is not allowed when the object is closed." on the line where I try to execute GetRows).

I've looked through my ADO documentation and don't see any reason why this should be happening (since it does return data). Due to the small amount of data, I'm going to just use a plain old RecordSet object, but for my own piece of mind does anyone know why it won't treat the returned @@IDENTITY variable like normal data?

View Replies View Related

How To Prevent Duplicate Values When Using BULK INSERT To Insert CSV To SQL Server?

How to prevent duplicate values when using BULK INSERT to insert CSV to SQL Server? Code:

View Replies View Related

Error Using <select></select>

I have written some code which should dynamically build a table which is then populated with questionas and possible answers. The format of the answers will vary ie they may be in the form of a radio button which will be rated from 1-5, checkbox or a selectbox.

The first problem I have is if I do not comment out <select></select> I get an error message saying the page can not be found. when I do take it out I get asp timeout. Code:

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

Connecting To MySql With ASP

how to connect to MySql Database using IASP .

View Replies View Related

Site Asp.net With Mysql

How create site with webmatrix with MySql ?

View Replies View Related

Mysql And Datetime

I am using mysql as my database and which to use a datetime field, for both displaying the data and time and using it to sort the recordsets.

And although when you look at the Db it shows the data and time like this

yyyy-mm-dd hh:mm:ss

however if you simply display the field it displays like this

mm/dd/yyyy hh:mm:ss am (or pm)

I want to sort the data out so that it displays dd/mm/yyyy and there is no time, i can do this but wanted to know if there is a better way of doing it

My problems being I first have to work out if the date is below 10 then us a split function according, then the same with the month, then i have to use a massive if statement, to get it to display in words, and then I have to us the queries before so i can split the year, even if i use to fields in the db to store time and date i would still have the same problems, what is the best way to do this, Plus i may have more than one record to do, will this make a big different in processing my page if i say have 20 records to do.

and just to make sure is the timedate field suitable to sort my record sets out.

View Replies View Related

Getting Started With MySQL

I have been using Access and ASP for about one year. I'm getting verty comfortable with this now.

I want to pull some data out of a mySQL database for my ASP pages. It's the database for my PHBBB forum. I'm a bit overwhlemed on where to start. Boy is it difference.

I have made the DB connection and see the tables. As I said it's very different.

Any advice on getting started with mySQL so I can start getting some results?

View Replies View Related

Asp-mysql Eror

I m using windows 2003 server, mysql and asp for my web site, I can select, insert, delete data from mysql, but I cannot update, this is the error that I get

Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.

and this is where the error is in the script:

objNotas.Open SQL, DBConn, 1, 3

View Replies View Related

ASP.NET And MYSQL Backup

I am looking for a way to use an ASP.NET button in order to start a backup of a MySql database..

View Replies View Related







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