Hallo!
Möchte aus einer SQL-Datenbank Daten auslesen und abspeichern (evtl. auch XML - File) und gleichzeitig in der Datenbank löschen!
Kann mir da jemand helfen? mfg
Harald
AW: Daten aus SQL-Datenbank auslesen und gleichzeitig
17.02.2005 09:32:08
ray
hallo harald,
leider habe ich keine antwort für dich, interessiere mich aber ebenfalls dafür.
ch bearbeite ein ähnliches projekt und habe noch nicht die lösung erarbeitet. Mail doch mal, wenn Du die Lösung hast.
Viele Grüße ray
AW: Daten aus SQL-Datenbank auslesen und gleichzeitig
Nike
Hi,
hier mal ein Ansatz:
'Creates connection to the SQL Server ' Create the Connection Object. Set conn = CreateObject("ADODB.Connection") ' Set the Connection String. conn.ConnectionString = "DSN=C:\Program Files\Common Files\ODBC\Data Sources\data.dsn;DRIVER=SQL Server;SERVER=PSG1SQLDATA\INSTANCE01;DATABASE=DCAEXECS_HEADS;" conn.Open 'Or create an odbc dsn entry in the windows odbc administrator 'and then point to it instead of fully qualifying the dsn in the script Set rcRecordSet = conn.Execute("SELECT KeyID from Ids") 'instead of select use Update or delete... Sheets("DataBase").range("A1").copyfromrecordset
Bye
Nike