connection to a microsoft SQL server
connection to a microsoft SQL server
am 27.07.2005 17:57:06 von personel personel
--0-651926039-1122479826=:55163
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Hello,
I am using the API of MySQL. I developed an executable with Visual Studio 6.0 that can connect to a MySQL server. I would like this executable to connect to a Microsoft SQL server. I tried using the routine mysql_real_connect() but it did not work. I got the message:
"Failed to connect to database: Error: Can't connect to MySQL server on (10061)"
1) Is it possible to connect to a microsoft SQL server?
2) If yes, could you explain how?
Regards,
Pascal Lalonde,
Canada.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
--0-651926039-1122479826=:55163--
Re: connection to a microsoft SQL server
am 27.07.2005 18:02:09 von SGreen
--=_alternative 00586CE88525704B_=
Content-Type: text/plain; charset="US-ASCII"
personel personel wrote on 07/27/2005 11:57:06 AM:
> Hello,
>
> I am using the API of MySQL. I developed an executable with Visual
> Studio 6.0 that can connect to a MySQL server. I would like this
> executable to connect to a Microsoft SQL server. I tried using the
> routine mysql_real_connect() but it did not work. I got the message:
>
> "Failed to connect to database: Error: Can't connect to MySQL server
> on (10061)"
>
> 1) Is it possible to connect to a microsoft SQL server?
>
> 2) If yes, could you explain how?
>
> Regards,
>
> Pascal Lalonde,
> Canada.
>
1) Yes, it is possible to write programs that connect to MS SQL server.
However, you cannot do that with the MySQL connection protocols. You will
have to use a different set of objects (a different API) like ADO, or
OLEDB that are built to work with MS SQL server in order to make that kind
of connection.
2) No, that would be WAY off-topic for a MySQL discussion group. May I
please refer you to the Microsoft Developer Network (
http://msdn.microsoft.com/default.aspx) as a primary source for details
about enabling programs to work with their products.
Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine
--=_alternative 00586CE88525704B_=--
Re: connection to a microsoft SQL server
am 27.07.2005 18:07:43 von Brandon Schenz
This is one of the reasons I like .NET.
In .NET I create an abstract Data Access Layer that is connection
independent, then use a configuration file to indicate what sort of
Database server to connect to. If you have .NET available to you check
out DotNetNuke.com and see how they implement this via a SQL Server
Database or an Access Database.
Also, with .NET check out the Data Application Block. This does not
support MySQL out of the box, but I have heard of a few projects in
GotDotNet.com where it has been ported to use MySQL.
*Brandon Schenz*
Midwest Sports Supply
IT Manager
Phone: 513-956-4900
Fax: 513-956-4910
E-mail: brandons@midwestsports.com
personel personel wrote:
>Hello,
>
> I am using the API of MySQL. I developed an executable with Visual Studio 6.0 that can connect to a MySQL server. I would like this executable to connect to a Microsoft SQL server. I tried using the routine mysql_real_connect() but it did not work. I got the message:
>
>"Failed to connect to database: Error: Can't connect to MySQL server on (10061)"
>
>1) Is it possible to connect to a microsoft SQL server?
>
>2) If yes, could you explain how?
>
>Regards,
>
>Pascal Lalonde,
>Canada.
>
>__________________________________________________
>Do You Yahoo!?
>Tired of spam? Yahoo! Mail has the best spam protection around
>http://mail.yahoo.com
>
>
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org
Re: connection to a microsoft SQL server
am 27.07.2005 18:11:07 von Daniel da Veiga
I don't think a MySQL API has this feature, well, its a MYSQL thing,
so, it understands the mysql protocol, that probably differs from SQL
Server a lot, besides, its an open source database api trying to
connect to a proprietary database server, sincerely, I don't think
this would work at all, if it can do the trick, I'm sure a developer
with more experience than me will answer your question.
The error you get its a protocol thing, I don't even know wich port
SQL Server uses, assuming its using the same (3306) that MySQL does,
still, it can't shake hands to stablish the connection because it
talks a different language.
On 7/27/05, personel personel wrote:
> Hello,
>=20
> I am using the API of MySQL. I developed an executable with Visual Stud=
io 6.0 that can connect to a MySQL server. I would like this executable to =
connect to a Microsoft SQL server. I tried using the routine mysql_real_con=
nect() but it did not work. I got the message:
>=20
> "Failed to connect to database: Error: Can't connect to MySQL server on <=
name of server> (10061)"
>=20
> 1) Is it possible to connect to a microsoft SQL server?
>=20
> 2) If yes, could you explain how?
>=20
> Regards,
>=20
> Pascal Lalonde,
> Canada.
>=20
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>=20
--=20
Daniel da Veiga
Computer Operator - RS - Brazil
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=3Dgcdmw-win32@m.gmane.org
RE: connection to a microsoft SQL server
am 28.07.2005 01:10:54 von jbonnett
You can connect to SQL Server but not by using the MySQL library
routines. Use Microsoft's own ADO routines. I usually write my database
apps so that all communication with the database is done via a single
routine that runs SQL statements for me. Providing you use very standard
SQL, only this routine needs some adjustment. I have used essentially
the same application with MySQL, SQL Server and Access in this way.
John B.
-----Original Message-----
From: personel personel [mailto:lepascal01@yahoo.com]=20
Sent: Thursday, 28 July 2005 1:27 AM
To: win32@lists.mysql.com
Subject: connection to a microsoft SQL server
Hello,
=20
I am using the API of MySQL. I developed an executable with Visual
Studio 6.0 that can connect to a MySQL server. I would like this
executable to connect to a Microsoft SQL server. I tried using the
routine mysql_real_connect() but it did not work. I got the message:
=20
"Failed to connect to database: Error: Can't connect to MySQL server on
(10061)"
=20
1) Is it possible to connect to a microsoft SQL server?
=20
2) If yes, could you explain how?
=20
Regards,
=20
Pascal Lalonde,
Canada.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around=20
http://mail.yahoo.com=20
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=3Dgcdmw-win32@m.gmane.org