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.

MySql ODBC und .Net Connector mit Blob anwenden

Empfohlene Antworten

Veröffentlicht

Hallo Leute!

Ich habe ein seltsames (für mich) Problem mit dem Odbc Treibern in meinem Program. Ich kann keine Dateien in der Datenbank speichern. Ich habe die 3.51 und die 5.1 Connector ausprobiert, aber ohne Erfolg. Wenn ich das gleiche mit dem .Net Connector (5.2.2) versuche, dann klappt alles. Das ganze wird in VB2005 und MySQL 5.1 versucht. In der Datenbank habe ich eine Tabelle tab, die eine Spalte file (mediumblob) hat. Hier ist der Code:


dim con as MySqlConnection             'bzw OdbcConnection

dim com as MySqlCommand               'bzw OdbcCommand

dim sql as String

dim arr() as Byte


arr=File.ReadAllBytes("test.xls")

str="insert into tab (file) value (?Bytes);"


'con = New OdbcConnection("Database=...")

'com = New OdbcCommand(sql,con)


con = New MySqlConnection("Database=...")

com = New MySqlCommand(sql,con)


com.Parameters.AddWithValue("Bytes",CType(arr,Byte()))


con.open()

com.ExecuteNonQuerry()

con.close()

Ich habe auch schon div. andere Codeschnipsel mit Odbc ausprobiert, aber auch ohne Erfolg.

Also wie schon gesagt, mit MySqlConnection geht, aber mit Odbc nicht.

Wie könnte ich mit der OdbcConnection die Dateien speichern?

Hat jemand eine Idee?

Danke :(

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.