Ok! This works, but what about modifying fields in the MySQL Linked
Server ?
I have this problem from long ago.=20
I'm waiting for a new ODBC driver with at least the ability to send two
distinct command as a workaround for the need for the openquery call to
have something in return.=20
Eg:=20
select a.* from openquery(MySQLLinkedServer, 'INSERT INTO company
(company_name, costreet, creditlimit) VALUES ("A", 10.10 , 10.10);
select trim(company_name), trim(costreet), creditlimit from company')
Or there is something I don't understand (or some trick with MySQL
stored procedures) ?
Bye
Pier
P.S.: Sorry for my english
> Inviato: gioved=EC 26 febbraio 2004 20.20
> Oggetto: RE MySQL -> Linked Server in MS SQL Server
>=20
>=20
> Hi,
>=20
> Yesterday I posted a question regarding setting up a MySQL db=20
> as a linked server in MS SQL Server, after much messing=20
> around I managed it using the following :
>=20
> The key was to instal the ODBC driver on the box that SQL=20
> Server was sitting on. Once I did that I defined a System DSN=20
> - (Make sure that the user you use has access permissions to=20
> the MysSQL db) once the DSN tested Ok. I went into Add Linked=20
> Serevrs on the SQL Server box (not over the network, you need=20
> to either use the console or something like VNC) defined the=20
> Linked Server using the OLE DB ODBC connector and the DSN=20
> that I had just defined - here I found you need to set on the=20
> Security tab, under "For a login not defined in the list=20
> above" the option "Be made using this security context" and=20
> enter the user defined as the UID for the DSN - and password=20
> of course.
>=20
> After that the tables appeared and using query analyser I=20
> could get at the data using the openquery function.. one last=20
> trick, I found I had to use the "Trim()" function on all=20
> character columns in my queries, otherwise I got errors about=20
> incorrect lengths.. something along the lines of
>=20
> select a.* from openquery(MySQLLinkedServer, 'select=20
> trim(company_name), trim(costreet), creditlimit from company') as a
>=20
> This also works fine to create views, stored procs etc
>=20
> Hope this helps if anyone is stuck on this
>=20
> --=20
> MySQL ODBC Mailing List
> For list archives: http://lists.mysql.com/myodbc
> To unsubscribe: =20
>=20
>=20
MySQL ODBC Mailing List
For list archives: http://lists.mysql.com/myodbc