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

Kako Pročitati IP adresu kroz access ???

[es] :: Access :: Kako Pročitati IP adresu kroz access ???

[ Pregleda: 3384 | Odgovora: 5 ] > FB > Twit

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

gorancho
Srbija

Član broj: 149371
Poruke: 89
*.internet.krstarica.net.



Profil

icon Kako Pročitati IP adresu kroz access ???05.09.2008. u 11:12 - pre 190 meseci
Želeo bi da u log fajl upisujem IP adresu računara sa kog se ažurira baza na serveru pa rekoh pomažite ako možete !?!?
 
Odgovor na temu

domaci_a_nas
PHP developer

Član broj: 42333
Poruke: 524
*.dynamic.sbb.rs.



+8 Profil

icon Re: Kako Pročitati IP adresu kroz access ???05.09.2008. u 14:51 - pre 190 meseci
Zašto mora IP adresa, zar nije dovoljno korisničko ime, da li je LAN u pitanju?
Ozbiljan i odgovoran mladić
 
Odgovor na temu

gorancho
Srbija

Član broj: 149371
Poruke: 89
91.150.122.*



Profil

icon Re: Kako Pročitati IP adresu kroz access ???06.09.2008. u 07:47 - pre 190 meseci
U celoj mrezi su statičke ip adrese, serveru se pristupa preko nje pa rekoh zašto da ne upisujem i u log fajl.
Dakle nemora, ALI BI BILO LEPO.
 
Odgovor na temu

Trtko
Koprivnica

Član broj: 69494
Poruke: 695
87.252.130.*



+8 Profil

icon Re: Kako Pročitati IP adresu kroz access ???06.09.2008. u 14:16 - pre 190 meseci
Pa mogao bi.

nekad sam u clipperu tako radio da vidim tko je sve u mreži

nekako je to ovako išlo , a tako možeš u acessu

1. U accesu run dos komandu (moraš vidjeti koju ) "Net view >komp.txt"
2. Otvoriš taj fajl i potražiš red koji ti treba i proćitaš ga "

tako nekako bi ga mogao zeznuti

 
Odgovor na temu

domaci_a_nas
PHP developer

Član broj: 42333
Poruke: 524
*.dynamic.sbb.rs.



+8 Profil

icon Re: Kako Pročitati IP adresu kroz access ???06.09.2008. u 15:09 - pre 190 meseci
Tršo, opet sam ti pisao...

gorancho, možda da pokušaš da preko Front Enda upišeš broj u bazu, s tim što taj IP broj prosečnom ljudskom mozgu ništa ne znači...

Ono što Trle kaže je verovatno shell ("C:\WINDOWS\SYSTEM32\cmd.exe /k ipconfig/all > C:\test.txt"). Sad, cmd ostaje aktivan nakon izvršavanja, ali ne možeš imati baš sve... Pokušaj na netu da pogledaš DOS komandu START koju bi ukombinovao u ovom redu, meni nekako ne ide, a znam da bi to zatvorilo.
Ozbiljan i odgovoran mladić
 
Odgovor na temu

gorancho
Srbija

Član broj: 149371
Poruke: 89
93.86.109.*



Profil

icon Re: Kako Pročitati IP adresu kroz access ???06.09.2008. u 21:11 - pre 190 meseci
Hvala puno na trudu.

EVO REšENJA !!! (sa neta)

Option Explicit


'
Option Compare Database

'A couple of API functions we need in order to query the IP addresses in this machine
Public Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long)
Public Declare Function GetIpAddrTable Lib "Iphlpapi" (pIPAdrTable As Byte, pdwSize As Long, ByVal Sort As Long) As Long

'The structures returned by the API call GetIpAddrTable...
Type IPINFO
dwAddr As Long ' IP address
dwIndex As Long ' interface index
dwMask As Long ' subnet mask
dwBCastAddr As Long ' broadcast address
dwReasmSize As Long ' assembly size
Reserved1 As Integer
Reserved2 As Integer
End Type

Public Function ConvertIPAddressToString(longAddr As Long) As String

Dim IPBytes(3) As Byte
Dim lngCount As Long

'Converts a long IP Address to a string formatted 255.255.255.255
'Note: Could use inet_ntoa instead

CopyMemory IPBytes(0), longAddr, 4 ' IP Address is stored in four bytes (255.255.255.255)

'Convert the 4 byte values to a formatted string
While lngCount < 4

ConvertIPAddressToString = ConvertIPAddressToString + _
CStr(IPBytes(lngCount)) + _
IIf(lngCount < 3, ".", "")

lngCount = lngCount + 1

Wend

End Function

Public Sub GetIPAddresses(Optional blnFilterLocalhost As Boolean = False)

Dim Ret As Long, Tel As Long
Dim bytBuffer() As Byte
Dim IPTableRow As IPINFO
Dim lngCount As Long
Dim lngBufferRequired As Long
Dim lngStructSize As Long
Dim lngNumIPAddresses As Long
Dim strIPAddress As String

On Error GoTo ErrorHandler:

Call GetIpAddrTable(ByVal 0&, lngBufferRequired, 1)

If lngBufferRequired > 0 Then

ReDim bytBuffer(0 To lngBufferRequired - 1) As Byte

If GetIpAddrTable(bytBuffer(0), lngBufferRequired, 1) = 0 Then

'We've successfully obtained the IP Address details...

'How big is each structure row?...
lngStructSize = LenB(IPTableRow)

'First 4 bytes is a long indicating the number of entries in the table
CopyMemory lngNumIPAddresses, bytBuffer(0), 4

While lngCount < lngNumIPAddresses

'bytBuffer contains the IPINFO structures (after initial 4 byte long)
CopyMemory IPTableRow, _
bytBuffer(4 + (lngCount * lngStructSize)), _
lngStructSize

strIPAddress = ConvertIPAddressToString(IPTableRow.dwAddr)

If Not ((strIPAddress = "127.0.0.1") _
And blnFilterLocalhost) Then

'Replace this with whatever you want to do with the IP Address...
Debug.Print strIPAddress

End If

lngCount = lngCount + 1

Wend

End If

End If

Exit Sub

ErrorHandler:
MsgBox "An error has occured in GetIPAddresses():" & vbCrLf & vbCrLf & _
Err.Description & " (" & CStr(Err.Number) & ")"

End Sub
 
Odgovor na temu

[es] :: Access :: Kako Pročitati IP adresu kroz access ???

[ Pregleda: 3384 | Odgovora: 5 ] > FB > Twit

Postavi temu Odgovori

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