Database Connection String To MySQL-database On A ...



Database Connection String To MySQL-database On A Different Server

I work with ASP for several weeks now and i really like it! But until now i have just used it in connection with my localhost. I made connections to a SQL Database and to an ACESS Database with using the ODBC Tool from WIndows!!

Now i want to publish my website but i don't know how to handle the connection string kind of thing. My MySQL-Database is on a different server than the website and i need a connection string where i can type in the server, a password and a username and it should then connect.

[pic]

Database Connection

I am familiar with connecting asp pages to sql server when both servers are

on a LAN.

Can anyone advise on how to connect when the servers are remote from each

other?

[pic]

Database Connection

I was wondering if i can create an if/else statement that checks if my connection string that opens a database ie:

cnnDB.Open Application.Contents.Item("CONNECTION_STRING" )

(the actuall connection string is in my global.asa file incase u were wondering) ...or if the database can't be found or opened, will run some other code... like a message?

hope u get what i mean.

this is just incase a user has the DB opened, or is in the process of overiting the DB or something, the page would not display that Microsoft JET Database Engineerror but display a message i set up in the if/else statement.

[pic]

Database Connection

I have created a database called "myshop.mdb" Then I create a System DSN connected to that database called "OE1" The following code retrieves attributes and possible errors from the DSN Code:

[pic]

Database Connection.

I have been trying to get an intranet search page to work that looks at an Access database. The database is called database.mdb, and lives in the root of the site, as does the .asp (security is not a problem at the moment). The code was taken from an asp website. I am running .net and Windows server 2000.

Could someone look at the code and tell me if it looks OK for connecting to the database? Then at least I can rule out code as the problem I am having.(receiving error codes)

[pic]

Database Connection

I am getting this error at all my ASP pages. A sample page which pulls the categories from the Northwind database is enclosed below where I get the error when I am trying to open a recordset with that SQL query and Connection. Code:

[pic]

Database Connection

i want to open a connection for password protected database but i don't want to write password in code as it can be seen by my host provider and misused is there any way I can read database password without writing it in my code.

Set cN = Server.CreateObject ("ADODB.Connection")

cN.Open "DRIVER={Microsoft Access Driver (*.mdb)}; password=joy; DBQ=" & Server.MapPath("db1.mdb")

above example works fine but i dont want to write password in my code is there any way i can do it.

[pic]

Database Connection

How do i detect whether the database connection is open or not in a asp page?

[pic]

Database Connection

Is there any good reason why this shouldn't work?! All I get is the word "venue" and it doesn't display the relevent field value beside it.

Set cn = Server.CreateObject("ADODB.Connection" )

strConn = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("db/db1.mdb" )

cn.open strConn

strSQL2 = "SELECT * from Events where ID = " & intEventID

Set rs = cn.execute(strSQL2)

response.write "venue" & rs("Venue" )

response.end

[pic]

Database Connection

I have one database, but nine web sites all linking to this database for client input.hen I use the domain web site that the database is atored under, the ASP page updates the database as required. I have been using the following connection:

"DRIVER={Microsoft Access Driver (*.mdb)};DBQ=C:domainsmyweb site domain namedbmy database.mdb"

Now I have saved this ASP page under one of my other domain names and have tried using an ODBC connection as follows:

"DSN=ODBC Connection;Driver={Microsoft Access Driver (*.mdb)};Dbq=my web site database domaindbmy database.mdb;Uid=Admin;Pwd=;"

Unfortunately when I complete the ASP page on this web site, and submit, the database is not being updated with the records.

[pic]

DSN Connection Without Database

how to connect to a DSN from ASP without specify a database?in VB6 it's possible and works fine:Code:

Dim myconn as new ADODB.connection

myconn.open "DSN=test"

[pic]

Database Connection

i have a sign up page it work good when i try it it write the information in the database but if i rewrite the same thing it rewrite it in the database.i need a script that if the name already existe it cannot be recreated.

i want to have a log on page but i dont know how to make the page got verify in the database for the username and password.i need the script for when they login to go get the info about the caracter but i need the script to make the user to stay connected like for there score in the game to be saved in there account. so this is it, if you don't uderstand just specify what you don't understand . by the way my page is in asp and my database is in acess .

[pic]

Database Connection

set rs=server.createobject("ADODB.recordset")

sql ="SELECT company_name FROM contacts WHERE company_name =" & cStr(sField)

If Len(sql)> 0 Then

rs.open sql,conn,3,3

sql is defined above and conn is defined in another asp page. What I am wondering is what does the ,3,3 do? and Is it necessary to have this in the page?

[pic]

Database Connection

i have built an Intranet using includes, which is about all the access of the IIS server I have. I really want to have database functionality so that I can use an Access database - but cannot and will not be able to use ASP to connect to it

how I can do this without using ASP? Client-Side, or something similar? Or any other way..? All I have to play with is a standard business-wide build of IE, and a very limited IIS server.

[pic]

Database Connection

what is the connection string to connect to a excel database.

[pic]

Multiple Database Connection

I am trying to connect to two different database(Oracle and Access) in my ASP page.

I keeps getting the following error message

Error Type:

Provider (0x80004005)

Unspecified error

What would be the best way to do the multiple database connection?

[pic]

Database Connection With Acess In ASP?

Can someone please help me with this ASp script?

What i am tryiong to do ? Trying to connect to access database

Is DSN set ? Yes

Operationg System ? XP Prof

DSN Name ? NW

[pic]

DATABASE CONNECTION PROBLEM

I am using the below code to try and connect to An Access Database on the same server. Code:

[pic]

Multi Database Connection

I have written a asp application whihc uses a number of pages and each page connects to a sql database.

Currently I have the connection script coded on each page however if i need to change the database I have to change every page.

I have been told there is a way to have the connection on one page and each page to referance this one so I only need to change the one page

[pic]

Database Connection Problem

I am trying to connect to a database in a folder called 'db' the database name is games.mdb . The File that is trying to open the database is called data.asp. This file is in a folder in a subdirectory of the parent directory of 'db'. The code seems to work up to here (it does not give me any errors):

objRS.Open "names", objConn, adOpenForwardOnly, adLockReadOnly, adCmdTable

At this line it gives me this message:

error '80004005'

/data.asp, line 24

All I am trying to do is open the names table and print out the Names in the table. Here is my code. Code:

[pic]

Database Connection Thru FileDSN

I am currently using file dsn to locate my ms access database using ASP. Is this also possible for ? If yes, can you help me with the code?

[pic]

Database Connection Question

rs.Open "select [File Size],[File Data] from Files where ID = " & _

ID, connStr, 2, 4

can somebody tell me what 2 and 4 stand for in the above command?

[pic]

Problem With Database Connection

I have 3 pages in my current setup:

Login: Page for user to login

Index: Page where user is directed to

Test A test page

The login oage works fine which directs the user to the index page. However the test page is a copy of the index page and when i link the 2 pages together i get the following error:

Error Type:

ADODB.Field (0x80020009)

Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.

[pic]

Access Database Connection

I am passing 3 hidden fields to another page using the method="post"

Here is the next page -

[pic]

Database Connection Error

I have an unusual problem and am stuck trying to solve it. My code worked fine last week and hasnt been altered since. I now get the following error:

Microsoft JET Database Engine error '80004005'

Cannot open database ''. It may not be a database that your application recognizes, or the file may be corrupt.

/Cs_Jobs.asp, line 41

The code i am using to acces the DB is: Code:

[pic]

Database Connection Question

Should I close the sessions I want open on every page or just the ones that are exclusive to that page? Like for the user session which I want on every page. Should I just leave it open?

[pic]

Database Connection Error

My database is on another disk partition. When I try to run the following code to make a connection to my DB. I get an error message.

"server.mappath must use a virtual path, physical path has been used"

How can I fix it?

strDataPath = server.MapPath("T:databaseTest.mdb")

strConnectString = "Provider=Microsoft.Jet.OLEDB.4.0;"_

+ " Data Source= " & strDataPath & ";"_

+ " Mode=Share Deny None;User Id=admin;PASSWORD=;"

[pic]

Database Connection Problem

I'm using Win XP..and MS office XP & ASP. A database connection error occur during

the compilation..the error looks like this:

Microsoft OLEDB Provider for ODBC Drivers

[Microsoft ODBC Microsoft Access Driver]General error

unable to open registry key 'Temporary (volatile) Jet DSN for process 0x604 Thread 0xb2c DBc 0x132ofcJet

[pic]

Connection To Access Database

I've got a question about connecting to a access database. I would like to "convert" the following code:Code:

to code where a connection is being made without dsn. Could anybody help me?

[pic]

Bypassing A Database Connection

I have a bit of code which executes an SQL statement.on my webpage. If the execution fails i do not want a standard error coming up that asp normally shows - instead i would like something like

if (cnn.execute) = failed Then

'Do This

End If

[pic]

Slow ASP-SQL Database Connection

My ASP pages have very slow connections with SQL Server database, although eventually it will reach the page and get the results. The SQL Server database and IIS are in the same machine, I have no idea why it will cause the problem.

I just put this connection string as SSI:

strConnect="Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security

Info=False;Initial Catalog=MYDATABASE;Data Source=MYCOMPUTER"

[pic]

Database Connection Using Odbc

I am trying to connect to an Access database that I have setup through .NET.

Any help on the code required to connect to an Access database in .NET using ODBC (no oledb) ....

[pic]

Database Connection MS SQL Server

Im creating my first asp website and am wondering if asp (JS) works well with a MS SQL server. If so how do I connect to it.

[pic]

Database Connection Method

what is more efficient, opening the database once in the beginning of the page then closing it at the end of the page, or opening the db connection each time you need it.

for example:

i have a page that executes 50 queries. is it better to open the db, execute the queries, then close it, or to open and close the db 50 times?

[pic]

Verifying A Database Connection

I have a particular application that I want to verify if my database connection is available and, if so, display an appropriate message. Pretty simple I think but I can't seam to figure it out how to do it. I though maybe a simple "IF... THEN... ELSE..." maybe, such as

IF my_database_connection is up_and_available

THEN write "The Database is available"

ELSE write "The Database is NOT available"

END IF

Does anyone know exactly what I need to write in order to do this? In case you need to know I'm connecting to a MS Access database.

[pic]

Connection To Remote Database

Is there a way of making a connection to a database on a remote server? The intention is not to hack, but I have a customer who would like to perform a search in several identical databases on different web servers (with the owners permission) and show the result on the customers own web page.

Could this be done? Of course there must be some level of security, the db owners will if necessary give permissions to our customer.

[pic]

Access Database Connection Problem

Our hosting service migrated our web page from a Windows 2000 Server to Windows 2003. Our website is .

I now intermittently receive error:

ADODB.Recordset error '800a0e7d'

The connection cannot be used to perform this operation. It is either closed or invalid in this context.

/shopcart/shopdisplaycategories.asp, line 36

I believe line 36 is "rs.Close". I can include additional code or the code opening the file if you need it. I utilize Microsoft 97 Access Database.

The hosting service indicated the problem lies in that the current code was written for Windows 2000 server. Our original programmer is no longer with the company and I'm at a loss to determine how to address the issue.

[pic]

Connection & ASP Link To Database - Not Working

I am new to asp pages and vbscripting and am having a problem trying to get a form in a html document to be submitted back to a asp page, then into a microsoft access database.But not sure what I am doing incorrectly. Every time I fix one error I seem to get another error.

This is the latest error, and I believe the problem exsists in the ASP page? Something to do with the connection, that it is not seeing the Nano.mdb database. It is set up correcly under the System DSN in the ODBC data source. Any ideas?

Microsoft OLE DB Provider for ODBC Drivers- Error '80004005'

[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

/WPF Project/NanoGroup.asp, line 39

Also would the connection string be in the include file or in the ASP file. If it is in the asp file, then do I need to attach the include file? Code:

[pic]

The Correct Way To Close A Database Connection?

I'm looking at another developers code and I'm now confused about the correct way to close a database connection and destroy the object. I would normally do it this way: Code:

[pic]

Got Problem With Connection To Access Database

i run asp in my standalone pc, using access2003 as the database, like this:

i hv 3 pages,

1st page, i open the database, extract data from database for display(closing the connection using "recordset.close" and "conn.close").... then i have form input for users to input some information...and post to 2nd page

2nd page, this page may load N times depending on the user input in first page...for each time loading, i hv form input for users to input the detailed information. and for 2nd to Nth loading, i will get previous page's form input information(request.form("xxx")), then insert into database ("conn.execute")and close it("conn.close")...

last page, this page get Nth loading user input information for the 2nd page, then open database, insert into database("conn.execute") and close it("conn.close")...

now the problem is like this...database can not store data correctly:

it did not insert N rows into database....maybe N+1 or N+M...randomly...because same data is insert more than once, so some rows are just duplicated...it seemes that the connection just can not be closed and do insertion more than once during each time the 2nd page is loading or during the last page is loading...

can anyone help me to find out the problem? any suggestion?

[pic]

MSDE Database Connection From IIS-ASP File

Using MSDE database & ASP file through IIS, both are in separate systems. Database is not connecting from IIS-ASP file.

Given error as "[DBNETLIB][ConnectionOpen (Connect()).]Specified SQL server not found", Using Provider=SQLOLEDB.1 But VB code is connecting using same provider

[pic]

How To Check Whether Database Connection Opened

I have to check wether the database connection is opened or not.I am using ASP with sql server database.

I can open connection and do all the transaction with the database,when multiple users are connected to that same sql server instance,i got an error like sql server not exist or access denide.So i want to check my status of the connection.

[pic]

Mdb Database Connection Error '80004005'

I have uploaded the site and when I browse to I get the following error:

Microsoft JET Database Engine error '80004005'

'C:DBdatabase.mdb' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.

/inc/connect.asp, line 31

This is my database string

db_str = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:wwwuserDBdatabase.mdb;"

What are we doing wrong?

Do we need to set up 'ODBC Drivers : Microsoft Access Driver (*.mdb)' in Hsphere? (If so, can anyone point me to a good tutorial please)

Also - do I need to set file permissions?

[pic]

Custom Connection To Access Database

I have an .ASP page with a form on it, which I want the info input into the form to be submitted to a database. I am trying to create a Custom Connection String in Dreamweaver but I am having a hard time. I set the path correctly, etc.

Is it not working because I am trying to run this with an Access database and it's on a Linux server? I thought i'd start out simple before I post a million pages of details.

[pic]

ODBC Enable Database Connection

In IIS 5, there's seem to be no ODBC loading under the log file format dropdown option. SO if i want to use ODBC enable database connection to store session data how shall i proceed? ODBC connection to store session data able to reduce data traffic on web server?

[pic]

Database Connection :: Could Not Find Installable ISAM

I am trying to connect to my database on a server, but am getting the following error: Could not find installable ISAM.

What is the problem here?

Code: ....

[pic]

Error Establishing Connection With MS Access Database!!

I am not able to connect to a MS Access Database..,, I am using a DSN Connection,

The Error that the asp page(having Database code) is showing everytime is....///

Error Type:

Microsoft OLE DB Provider for ODBC Drivers (0x80004005)

[Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine cannot open the file '(unknown)'. It is already opened exclusively by another user, or you need permission to view its data.

/airtickets/scripts/dbconn.asp, line 4

i havent opened the database bfore, & no other app. is accessing it ..

[pic]

Connection String For A MySQL Database Needed

I'm trying to get asp to conect to a MySQL database, I've tried copying a few examples online that I found [there doesn't seem to be many!!] and I always get a 500 error with the code below. what am i doing wrong? any examples of a working connection string anyone could show me would be fantastic.

[pic]

MapPath Error DB Connection Access Database

I seem to be getting this error, and after Googling and searching this site, I still can't get a grip on it. I have a site on a server which is being developed for a national company who will offer this site to their members, hosting each on the national orgainzations servers. I have this string -

openStr = "driver={Microsoft Access Driver (*.mdb)};" & _

"dbq=" & Server.MapPath("../databases/srt.mdb")

Which results in this error:

The '..' characters are not allowed in the Path parameter for the MapPath method

Ok, the common solution seems to be a configuration on the server, which wouldn't be a problem IF the site was to remain where it is. BUT, seeing as I will give this site to the client, who will host it on their servers, could this configuration "fix" be a problem, perhaps for security issues.

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download