Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.

export queries u txt file

[es] :: Access :: export queries u txt file

[ Pregleda: 2473 | Odgovora: 3 ] > FB > Twit

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

bojanink
Bojan Markovic
Data
BIH

Član broj: 233454
Poruke: 1
*.teol.net.



Profil

icon export queries u txt file21.09.2009. u 23:08 - pre 177 meseci
Pozdrav svima!

Potrebna mi je pomoc


exporto jedne tabele koja sadrzi broj, artikl, naziv, kolicinu iz queries u txt.




Probao sam

Private Sub Snimi_Click()
Dim Putanja
Putanja = "C:\Test.txt"
Open Putanja For Output As #1
Print #1, Me.Broj; Me.artikl; Me.naziv; Me.kolicina;
Close #1
'End

End Sub

U ovom slucaju ako imam 3 artikla prenese samo onaj na kome je fokus


Hvala svima!


Bojan
 
Odgovor na temu

savkov
Igor Savkov
Vrsac

Član broj: 21550
Poruke: 94
93.86.195.*



+2 Profil

icon Re: export queries u txt file22.09.2009. u 06:58 - pre 177 meseci
pogledaj temu slicno je http://www.elitesecurity.org/t354083-0#2193719

Igor
 
Odgovor na temu

captPicard
programer
more i planine

Član broj: 216084
Poruke: 1119



+19 Profil

icon Re: export queries u txt file22.09.2009. u 09:50 - pre 177 meseci
query.first

Code:
while not query.eof do
begin
//zapiši u txt
end;

F
 
Odgovor na temu

izonic
ishab zonic
Tuzla

Član broj: 38128
Poruke: 591
*.PPPoE-3492.sa.bih.net.ba.

Sajt: www.icentar.ba


+2 Profil

icon Re: export queries u txt file22.09.2009. u 10:15 - pre 177 meseci
Code:
Private Sub Command0_Click()
Dim DB As Database
Dim rs As Recordset
Dim txt As String
Dim Putanja As String

Close #1
Putanja = App_Path
Set rs = Me.RecordsetClone
Open Putanja & "\exportcsv.csv" For Output Shared As #1
   txt = "ime;prezime;ocena"
   Print #1, txt
Do While Not rs.EOF
txt = rs.Fields(0) & ";" & rs.Fields(1) & ";" & rs.Fields(2)
    
Print #1, txt
rs.MoveNext
Loop
rs.Close

Close #1
End Sub

Function App_Path()
App_Path = Access.CurrentProject.Path
End Function

zxz
 
Odgovor na temu

[es] :: Access :: export queries u txt file

[ Pregleda: 2473 | Odgovora: 3 ] > FB > Twit

Postavi temu Odgovori

Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.