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.

Access: SQL in VBA

Empfohlene Antworten

Veröffentlicht

Hallo Leute,

ich bins nochmal! Und zwar mich würde interresieren wie ich in VBA SQL Abfragen laufen lasse..

Hat da jemand vielleicht ein kleines Beispiel oder so...

Danke für alles

CK

Hi!

Meinst Du so:

currentdb.execute "DEINE SQL - ANWEISUNG"

Gruss

Ja so meinte ich es und wie kann ich das Ergebnis in eine Variable speichern??

CK

hi,

dim rs as dao.recordset

dim tmp as string

set rs = currentdb.execute("SQL")

if (not rs is nothing) then

while (not rs.eof)

tmp = rs.fields("feldname") [& ""]

wend

call rs.close

set rs = nothing

end if

mit diesem code wird ein recordset geoeffnet, welches die ergebnisse der sql-abfrage enthaelt. mit der while-schleife wird das recordset ueber alle datensaetze durchlaufen und der wert der spalte "feldname" in den string tmp geschrieben. mit diesem kannst du dann innerhalb der schlefe hantieren, wie du moechtest. die anweisung in [eckigen klammern] verhindert das auftreten einer "null-pointer-exeption", wenn in dem feld "feldname" nichts gespeichert war. (natuerlich ohne die klammern im code zu benutzen :-)

sollte eigenlich so funktionieren

greets

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

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.