DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
sorgu = "Insert Into MasterData (Artikel,ArtikelMetni,NetAgırlık,BrutAgırlık,KoliIci,KatıSıvı,YemDurumu,Durum) Values ("
sorgu = sorgu & "'" & Artikel & "','" & Replace(ArtikelMetni, "'", " ") & "'," & Replace(NetAgirlık, ",", ".") & "," & Replace(BrutAgirlık, ",", ".") & ","
sorgu = sorgu & "" & Replace(Kolici, ",", ".") & ",'" & KatiSivi & "','" & YemDurumu & "','" & "Onayli" & "')"
' MsgBox sorgu
' Cells(50, "A") = sorgu
Sonuc = False
Call VeriIslemi(sorgu, Sonuc, Yol)
set rst = objConn.Execute("SELECT @@IDENTITY")
id = rst(0)
id = objadox.tables("table").columns("field").properties("Seed").value
Üstad, ben denedim .... çalışıyor.MS Access Auto Increment alanlar için şöyle bir şey varmış; test etmedim.
PHP:set rst = objConn.Execute("SELECT @@IDENTITY") id = rst(0)
Sub satisEkle()
If ActiveSheet.Name <> "GUNLUK" Then Exit Sub
If adoCn Is Nothing Then Call baglan
Set RS = CreateObject("ADODB.Recordset")
RS.Open "satislar", adoCn, 1, 3, 2
For r = 3 To Cells(Rows.Count, "Y").End(3).Row
If Cells(r, "x") <> "" Then
With RS
.AddNew
.Fields("tarih") = Format(Cells(r, 24), "M.d.yyyy")
For i = 24 To 42
If Cells(1, i) <> "" Then .Fields(Trim(Cells(1, i))) = IIf(IsNumeric(Cells(r, i)), Cells(r, i), Trim(Cells(r, i)))
Next i
.Update
'*****************************
MsgBox .Fields(0) '*******
'*****************************
End With
If Cells(r, "AM") <> 0 Then bakiyeDuzenle2 Cells(r, "y"), Cells(r, "AM") + bakiyeAl(Cells(r, "y"))
If Cells(r, "W") <> "" Then aciklamaDuzenle2 Cells(r, "y"), Cells(r, "W")
End If
Next r
RS.Close
End Sub
Public adoCn As Object
Dim rsTables As Object, rsFields As Object, RS As Object, RS1 As Object
Sub baglan()
Dim dosyaYolu As String
dosyaYolu = "Z:\DATA\atilim.mdb"
If Dir(dosyaYolu) = Empty Then
MsgBox dosyaYolu & " bulunamadı!"
GoTo safeExit:
End If
Set adoCn = CreateObject("ADODB.Connection")
adoCn.Provider = "Microsoft.ACE.OLEDB.12.0"
adoCn.Properties("Jet OLEDB:Database Password") = "***lım"
adoCn.ConnectionString = dosyaYolu
adoCn.Open
If adoCn.State = 1 Then
'MsgBox "ADO bağlantısı kuruldu"
Else
MsgBox "ADO bağlantısı kurulamadı."
GoTo safeExit:
End If
Set RS = CreateObject("ADODB.Recordset")
Set RS1 = CreateObject("ADODB.Recordset")
safeExit:
End Sub