Ask a Question related to ASP Database, Design and Development.
-
IPT #1
mySQL Connection String
I use mySQL but can connect.
Here is my code:
Set myconn = Server.CreateObject("ADODB.Connection")
myconn.Open "ODBC; Driver=Sybase SQL Anywhere 5.0;" & _
"DefaultDir=c:\inetpub\dbase\;" & _
"Dbf=c:\inetpub\dbase\mydb.db;" & _
"Uid=dba;" & _
"Pwd=sql;" & _
"Dsn="""""
Set rs = Server.CreateObject("ADODB.Recordset")
I get error message:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Driver Manager] Data source name not found and no default
driver specified
I refered to
[url]http://www.able-consulting.com/MDAC/ADO/Connection/ODBC_DSNLess.htm#ODBCDriverForSybaseSQLAnywhere[/url].
IPT Guest
-
#40207 [NEW]: Warning: mysql_connect() [function.mysql-connect]: Lost connection to MySQL ser
From: arif at peshawaronline dot com Operating system: PHP version: 4.4.4 PHP Bug Type: Compile Warning Bug description: ... -
need help with connection string
i keep reading that it is not secure to hard code the connection string to the server into my swf. so how can i get the string into my swf without... -
connection string
Hi there, I have recently changed the connection string on a site that was working perfectly. I used an OLE DB connection with this code: var... -
DB Connection String
Hi, I need to store the database connection string inside web.config file. What would be the best way to encrypt and decrypt it? Thanks, Ali -
Oracle DSN Less Connection String
Greetings.... Okay so far Dreamweaver MX connection to Oracle has left an awful bitter taste in my mouth.... I am trying a DSN Less Oracle... -
Wayne... #2
Re: mySQL Connection String
"IPT" <chency@streamyx.com> wrote in message
news:efxTr%236VEHA.2972@TK2MSFTNGP11.phx.gbl...the connection string I use [somewhat flakey!] but you might have some luck> I use mySQL but can connect.
>
> Here is my code:
> Set myconn = Server.CreateObject("ADODB.Connection")
> myconn.Open "ODBC; Driver=Sybase SQL Anywhere 5.0;" & _
> "DefaultDir=c:\inetpub\dbase\;" & _
> "Dbf=c:\inetpub\dbase\mydb.db;" & _
> "Uid=dba;" & _
> "Pwd=sql;" & _
> "Dsn="""""
> Set rs = Server.CreateObject("ADODB.Recordset")
with it is:
<%
strConnection = "driver={MySQL};server=localhost;uid=username; "
strConnection = strConnection & "pwd=password;database=databasename"
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open strConnection
%>
hope that helps
Wayne...
Wayne... Guest
-
Jeff Cochran #3
Re: mySQL Connection String
On Tue, 22 Jun 2004 00:49:03 +0800, "IPT" <chency@streamyx.com> wrote:
You say you can't connect to a MySQL database using the ODBC driver>I use mySQL but can connect.
>
>Here is my code:
>Set myconn = Server.CreateObject("ADODB.Connection")
>myconn.Open "ODBC; Driver=Sybase SQL Anywhere 5.0;" & _
> "DefaultDir=c:\inetpub\dbase\;" & _
> "Dbf=c:\inetpub\dbase\mydb.db;" & _
> "Uid=dba;" & _
> "Pwd=sql;" & _
> "Dsn="""""
>Set rs = Server.CreateObject("ADODB.Recordset")
>
>I get error message:
>Microsoft OLE DB Provider for ODBC Drivers error '80004005'
>
>[Microsoft][ODBC Driver Manager] Data source name not found and no default
>driver specified
>
>I refered to
>[url]http://www.able-consulting.com/MDAC/ADO/Connection/ODBC_DSNLess.htm#ODBCDriverForSybaseSQLAnywhere[/url].
for a Sybase database? I guess everything is acting as expected then.
Hint: When you look at a site for a connection string, picking a link
at random rarely works. Selecting the one for the database you use,
and modifying it according to your specific server setup, usually
does.
So, using MySQL, I'd think you'd have better luck with:
[url]http://www.able-consulting.com/MDAC/ADO/Connection/OLEDB_Providers.htm#OLEDBProviderForMySQL[/url]
Data Source, User ID and Password will need to be edited for your
specifc setup.
Jeff
Jeff Cochran Guest
-
Turkbear #4
Re: mySQL Connection String
On Tue, 22 Jun 2004 14:24:21 GMT, [email]jeff.nospam@zina.com[/email] (Jeff Cochran) wrote:
Actually it was the right site just wrong driver info:>On Tue, 22 Jun 2004 00:49:03 +0800, "IPT" <chency@streamyx.com> wrote:
>>>>I use mySQL but can connect.
>>
>>Here is my code:
>>Set myconn = Server.CreateObject("ADODB.Connection")
>>myconn.Open "ODBC; Driver=Sybase SQL Anywhere 5.0;" & _
>> "DefaultDir=c:\inetpub\dbase\;" & _
>> "Dbf=c:\inetpub\dbase\mydb.db;" & _
>> "Uid=dba;" & _
>> "Pwd=sql;" & _
>> "Dsn="""""
>>Set rs = Server.CreateObject("ADODB.Recordset")
>>
>>I get error message:
>>Microsoft OLE DB Provider for ODBC Drivers error '80004005'
>>
>>[Microsoft][ODBC Driver Manager] Data source name not found and no default
>>driver specified
>>
>>I refered to
>>[url]http://www.able-consulting.com/MDAC/ADO/Connection/ODBC_DSNLess.htm#ODBCDriverForSybaseSQLAnywhere[/url].
>You say you can't connect to a MySQL database using the ODBC driver
>for a Sybase database? I guess everything is acting as expected then.
>
>Hint: When you look at a site for a connection string, picking a link
>at random rarely works. Selecting the one for the database you use,
>and modifying it according to your specific server setup, usually
>does.
>
>So, using MySQL, I'd think you'd have better luck with:
>
>[url]http://www.able-consulting.com/MDAC/ADO/Connection/OLEDB_Providers.htm#OLEDBProviderForMySQL[/url]
>
>Data Source, User ID and Password will need to be edited for your
>specifc setup.
>
>Jeff
Here's wht was given about MySql:
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
ODBC Driver for MySQL (via MyODBC)
To connect to a local database (using MyODBC Driver)
oConn.Open "Driver={mySQL};" & _
"Server=MyServerName;" & _
"Option=16834;" & _
"Database=mydb"
To connect to a remote database
oConn.Open "Driver={mySQL};" & _
"Server=db1.database.com;" & _
"Port=3306;" & _
"Option=131072;" & _
"Stmt=;" & _
"Database=mydb;" & _
"Uid=myUsername;" & _
"Pwd=myPassword"
To connect to a local database (using MySQL ODBC 3.51 Driver)
oConn.Open "DRIVER={MySQL ODBC 3.51 Driver};" & _
"Server=myServerName;" & _
"Port=3306;" & _
"Option=16384;" & _
"Stmt=;" & _
"Database=mydatabaseName;" & _
"Uid=myUsername;" & _
"Pwd=myPassword"
Or
oConn.Open "DRIVER={MySQL ODBC 3.51 Driver};" & _
"SERVER=myServerName;" & _
"DATABASE=myDatabaseName;" & _
"USER=myUsername;" & _
"PASSWORD=myPassword;"
Note: When you first install MySQL, it creates a "root" user account (in the sys datbase's user table) with a blank
password.
For more information, see: Programs Known to Work with MyODBC
--------------------------------------------------------------------------------
Hope it helps..
Turkbear Guest
-
IPT #5
Re: mySQL Connection String
Oh my God!
I typed wrongly. This could be due to the scenario where I tried both
databasees.
My actual words should go like this:
"I use Sybase SQL Anywhere 5.0 with engine 5.5.04 Build #1867 but can't
connect."
Sorry.
"Turkbear" <noone@nowhere.com> wrote in message
news:l1ogd01r6sscjj3kgubibm7j7n11ap0p17@4ax.com...wrote:> On Tue, 22 Jun 2004 14:24:21 GMT, [email]jeff.nospam@zina.com[/email] (Jeff Cochran)default>> >On Tue, 22 Jun 2004 00:49:03 +0800, "IPT" <chency@streamyx.com> wrote:
> >> >>I use mySQL but can connect.
> >>
> >>Here is my code:
> >>Set myconn = Server.CreateObject("ADODB.Connection")
> >>myconn.Open "ODBC; Driver=Sybase SQL Anywhere 5.0;" & _
> >> "DefaultDir=c:\inetpub\dbase\;" & _
> >> "Dbf=c:\inetpub\dbase\mydb.db;" & _
> >> "Uid=dba;" & _
> >> "Pwd=sql;" & _
> >> "Dsn="""""
> >>Set rs = Server.CreateObject("ADODB.Recordset")
> >>
> >>I get error message:
> >>Microsoft OLE DB Provider for ODBC Drivers error '80004005'
> >>
> >>[Microsoft][ODBC Driver Manager] Data source name not found and noiverForSybaseSQLAnywhere.>> >>driver specified
> >>
> >>I refered to>>[url]http://www.able-consulting.com/MDAC/ADO/Connection/ODBC_DSNLess.htm#ODBCDr[/url]BProviderForMySQL>> >
> >You say you can't connect to a MySQL database using the ODBC driver
> >for a Sybase database? I guess everything is acting as expected then.
> >
> >Hint: When you look at a site for a connection string, picking a link
> >at random rarely works. Selecting the one for the database you use,
> >and modifying it according to your specific server setup, usually
> >does.
> >
> >So, using MySQL, I'd think you'd have better luck with:
> >
>[url]http://www.able-consulting.com/MDAC/ADO/Connection/OLEDB_Providers.htm#OLED[/url]----------------------------------------------------------------------------> Actually it was the right site just wrong driver info:> >
> >Data Source, User ID and Password will need to be edited for your
> >specifc setup.
> >
> >Jeff
>
> Here's wht was given about MySql:
> --------------------------------------------------------------------------
----------------------------------------------------------------------------
-------------------the sys datbase's user table) with a blank> ODBC Driver for MySQL (via MyODBC)
> To connect to a local database (using MyODBC Driver)
>
> oConn.Open "Driver={mySQL};" & _
> "Server=MyServerName;" & _
> "Option=16834;" & _
> "Database=mydb"
> To connect to a remote database
>
> oConn.Open "Driver={mySQL};" & _
> "Server=db1.database.com;" & _
> "Port=3306;" & _
> "Option=131072;" & _
> "Stmt=;" & _
> "Database=mydb;" & _
> "Uid=myUsername;" & _
> "Pwd=myPassword"
> To connect to a local database (using MySQL ODBC 3.51 Driver)
>
> oConn.Open "DRIVER={MySQL ODBC 3.51 Driver};" & _
> "Server=myServerName;" & _
> "Port=3306;" & _
> "Option=16384;" & _
> "Stmt=;" & _
> "Database=mydatabaseName;" & _
> "Uid=myUsername;" & _
> "Pwd=myPassword"
> Or
> oConn.Open "DRIVER={MySQL ODBC 3.51 Driver};" & _
> "SERVER=myServerName;" & _
> "DATABASE=myDatabaseName;" & _
> "USER=myUsername;" & _
> "PASSWORD=myPassword;"
>
> Note: When you first install MySQL, it creates a "root" user account (in------> password.
>
> For more information, see: Programs Known to Work with MyODBC
>
>
> -------------------------------------------------------------------------->
> Hope it helps..
>
>
IPT Guest
-
Jeff Cochran #6
Re: mySQL Connection String
On Thu, 24 Jun 2004 12:21:01 +0800, "IPT" <iwan@swopt.com> wrote:
Then your next step is to check here:>Oh my God!
>
>I typed wrongly. This could be due to the scenario where I tried both
>databasees.
>
>My actual words should go like this:
>
>"I use Sybase SQL Anywhere 5.0 with engine 5.5.04 Build #1867 but can't
>connect."
Why do I get database-related 80004005 errors?
[url]http://www.aspfaq.com/show.asp?id=2009[/url]
Jeff
>
>Sorry.
>
>"Turkbear" <noone@nowhere.com> wrote in message
>news:l1ogd01r6sscjj3kgubibm7j7n11ap0p17@4ax.com.. .>wrote:>> On Tue, 22 Jun 2004 14:24:21 GMT, [email]jeff.nospam@zina.com[/email] (Jeff Cochran)>default>>>> >On Tue, 22 Jun 2004 00:49:03 +0800, "IPT" <chency@streamyx.com> wrote:
>> >
>> >>I use mySQL but can connect.
>> >>
>> >>Here is my code:
>> >>Set myconn = Server.CreateObject("ADODB.Connection")
>> >>myconn.Open "ODBC; Driver=Sybase SQL Anywhere 5.0;" & _
>> >> "DefaultDir=c:\inetpub\dbase\;" & _
>> >> "Dbf=c:\inetpub\dbase\mydb.db;" & _
>> >> "Uid=dba;" & _
>> >> "Pwd=sql;" & _
>> >> "Dsn="""""
>> >>Set rs = Server.CreateObject("ADODB.Recordset")
>> >>
>> >>I get error message:
>> >>Microsoft OLE DB Provider for ODBC Drivers error '80004005'
>> >>
>> >>[Microsoft][ODBC Driver Manager] Data source name not found and no>iverForSybaseSQLAnywhere.>>>> >>driver specified
>> >>
>> >>I refered to>>>[url]http://www.able-consulting.com/MDAC/ADO/Connection/ODBC_DSNLess.htm#ODBCDr[/url]>BProviderForMySQL>>>> >
>> >You say you can't connect to a MySQL database using the ODBC driver
>> >for a Sybase database? I guess everything is acting as expected then.
>> >
>> >Hint: When you look at a site for a connection string, picking a link
>> >at random rarely works. Selecting the one for the database you use,
>> >and modifying it according to your specific server setup, usually
>> >does.
>> >
>> >So, using MySQL, I'd think you'd have better luck with:
>> >
>>[url]http://www.able-consulting.com/MDAC/ADO/Connection/OLEDB_Providers.htm#OLED[/url]>---------------------------------------------------------------------------->> Actually it was the right site just wrong driver info:>> >
>> >Data Source, User ID and Password will need to be edited for your
>> >specifc setup.
>> >
>> >Jeff
>>
>> Here's wht was given about MySql:
>> --------------------------------------------------------------------------
>----------------------------------------------------------------------------
>------------------->the sys datbase's user table) with a blank>> ODBC Driver for MySQL (via MyODBC)
>> To connect to a local database (using MyODBC Driver)
>>
>> oConn.Open "Driver={mySQL};" & _
>> "Server=MyServerName;" & _
>> "Option=16834;" & _
>> "Database=mydb"
>> To connect to a remote database
>>
>> oConn.Open "Driver={mySQL};" & _
>> "Server=db1.database.com;" & _
>> "Port=3306;" & _
>> "Option=131072;" & _
>> "Stmt=;" & _
>> "Database=mydb;" & _
>> "Uid=myUsername;" & _
>> "Pwd=myPassword"
>> To connect to a local database (using MySQL ODBC 3.51 Driver)
>>
>> oConn.Open "DRIVER={MySQL ODBC 3.51 Driver};" & _
>> "Server=myServerName;" & _
>> "Port=3306;" & _
>> "Option=16384;" & _
>> "Stmt=;" & _
>> "Database=mydatabaseName;" & _
>> "Uid=myUsername;" & _
>> "Pwd=myPassword"
>> Or
>> oConn.Open "DRIVER={MySQL ODBC 3.51 Driver};" & _
>> "SERVER=myServerName;" & _
>> "DATABASE=myDatabaseName;" & _
>> "USER=myUsername;" & _
>> "PASSWORD=myPassword;"
>>
>> Note: When you first install MySQL, it creates a "root" user account (in>------>> password.
>>
>> For more information, see: Programs Known to Work with MyODBC
>>
>>
>> -------------------------------------------------------------------------->>>
>> Hope it helps..
>>
>>Jeff Cochran Guest



Reply With Quote

