ERLEDIGT
NEIN
NEIN
ANTWORTEN
0
0
ZUGRIFFE
516
516
EMPFEHLEN
-
Hallo liebe User,
ich habe folgendes Problem:
und zwar will ich in eine Datei die auf einer AS400 liegt schreiben.
Zum Aufbau meines kleinen Programms:
Ich habe ein Flexgrid, mit einer CSV gefüllt (zb. Name, Vorname, Beruf, Telenr etc.)
Dann wähle ich per Combobox aus wo diese Felder in die Datei auf der AS400 hinsollen (zb. Name in AS400 Feld SYSNAME, Beruf in SYSBERUF)
Funktioniert auch wunderbar, nur wie bekomme ich es hin doppelte Einträge zu verhindern?Bzw. das wenn die Schlüsselfelder (Name & Vorname)
der Datensatz geupdatet wird ( zb. Name: Daniel , Nachname: Muster ; beim erste speichern nur die beiden Sachen angegeben, beim erneuten Speichern
soll noch Beruf und Telenr dann zu diesem ersten Satz hinzugespeichert werden)
Ist das möglich ? Wenn ja wie, komm einfach auf keine Lösung !
Hier mal ein Teil meines Programmcodes:
mir freundlichen grüßenCode :1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
Dim rowcount As Integer Dim listcount As Integer Dim listmax As Integer Dim ColMax As Integer Dim restCount As Integer Dim restMax As Integer Dim comboxCount As Integer Dim Output() As String Dim rest(0 To 2000) As String AS400Connection rs.Open "select * from " & Form1.txtBib.Text, cn, adOpenStatic, adLockOptimistic, adCmdText listmax = combox(0).listcount ColMax = MSFlexGrid1.Rows - 2 ff = FreeFile Open CommonDialog1.FileName For Input As #ff If Not EOF(ff) Then Line Input #ff, data Output = Split(data, ";") rowcount = UBound(Output) + 1 MSFlexGrid1.Rows = rowcount + 1 Seek 1, 1 End If Do While Not EOF(ff) Line Input #ff, data Output = Split(data, ";") rs.Open "select * from " & Form1.txtBib.Text, cn, adOpenStatic, adLockOptimistic, adCmdText cn.BeginTrans rs.addnew Do Do Until comboxCount = ColMax + 1 If combox(comboxCount).Text = combox(comboxCount).List(listcount) Then rs.Fields(listcount).Value = Output(comboxCount) comboxCount = comboxCount + 1 Loop comboxCount = 0 listcount = listcount + 1 Loop Until listcount = listmax rs.Update cn.CommitTrans rs.Close Loop Close #ff End Sub
Naui
Ähnliche Themen
-
Mit UNIQUE doppelte Datensätze verhindern
Von annalena49 im Forum PHPAntworten: 8Letzter Beitrag: 08.04.09, 18:25 -
Doppelte einträge verhindern
Von Knacki135 im Forum PHPAntworten: 9Letzter Beitrag: 19.08.08, 18:43 -
Doppelte Einträge verhindern
Von _root im Forum PHPAntworten: 11Letzter Beitrag: 23.08.05, 18:42 -
Doppelte Einträge in der Datenbank verhindern
Von Meitli im Forum ASPAntworten: 19Letzter Beitrag: 29.07.05, 12:18 -
Doppelte Ausgabe verhindern?
Von Lemmingz Shadow im Forum PHPAntworten: 2Letzter Beitrag: 22.11.02, 17:08





Zitieren
Login





