Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

SQL-Script in VB 6.0 ausführen

Empfohlene Antworten

Moin Moin zusammen,

habe folgendes Problem: Ich habe hier eine MS-SQL-DB und ein VB 6.0 Front-End.

Jetzt befinden sich im Projektordner SQL-Scripte (.sql), in welchen die Daten liegen, mit denen die Datenbank gefüllt bzw geupdatet werden soll.

Inhalt der .sql-Datei

Use DB

Go

DELETE FROM Tab

Go

INSERT INTO [Tab] (Sp1, Sp2, Sp3) VALUES ('a1', 'b1', 'c1');

INSERT INTO [Tab] (Sp1, Sp2, Sp3) VALUES ('a2', 'b2', 'c2');

INSERT INTO [Tab] (Sp1, Sp2, Sp3) VALUES ('a3', 'b3', 'c3');

INSERT INTO [Tab] (Sp1, Sp2, Sp3) VALUES ('a4', 'b4', 'c4');

INSERT INTO [Tab] (Sp1, Sp2, Sp3) VALUES ('a5', 'b5', 'c5');

Go

Die Spaltennamen in der Datenbank entsprechen dabei bereits denen aus dem SQL-Script.

Wie bekomme ich jetzt den Inhalt des Scripts in die DB?

Danke im Voraus :)

Danke :) das sieht soweit schon gut aus.

Hab das ganze jetzt als Klassenmodul erstellt.

Im Formular hab ich dann Folgendes:

Dim test as new clsqueryanalyzer

Set test.activeconn = DB

Call test.runtsql("")

Wie kann ich jetzt weitermachen? Ich müsste dem Programm an der Stelle sagen, wo das Script liegt oder?

Ein dankbarer Anfänger :)

lies die .sql-datei ein - z.b. in einen ADODB-stream oder einem FSO-stream und schick sie an die runtsql().

s'Amstel

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Konto

Navigation

Suchen

Suchen

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.