
17/07/2009, 15:14
|
| | Fecha de Ingreso: julio-2009
Mensajes: 7
Antigüedad: 15 años, 9 meses Puntos: 0 | |
[Ayuda] Como puedo convertir esto... ¡Hola!, primero que todo gracias por interesarte e entrar a este post... Bueno aquí mi problema... Tengo un codigo que conecta con una base de datos SQL pero ya no quiero que me conecte con sql si no que tengo la base de datos llamada "FlatFile".
Es decir lo quiero cambiar a FSO en Visual Basic 6.0:
Código:
Function V12Login(strData As String, Index As Integer)
'SSO login (site login)
'strTicket = Mid(strData, 5, decodeB64(Mid(strData, 3, 2))) 'NOT NEEDED TO DECODE
strTicket = Mid(strData, 5) 'Get the ticket from the packet
ticketRow = HoloDB.runRead("SELECT name,ipaddress FROM sso WHERE ticket = '" & strTicket & "'") 'Get the name from the sso table in the database matching this ticket
If ticketRow <> "" Then 'There was a ticket like the one sent
If Split(ticketRow, Chr(9))(1) = hSYS.sckGame(Index).RemoteHostIP Then 'If the IP trying to log in from is the same as the one who requested the ticket
Holo(Index).Name = Split(ticketRow, Chr(9))(0) 'Set the name for the user profile
If checkBanned(Index) = False Then 'If the user is not banned
HoloDB.runQuery ("DELETE FROM sso WHERE name = '" & Holo(Index).Name & "'") 'Delete all tickets in the table for this user (since logging in has succeeded)
funcLib.processLogin Index 'Process with login
End If
Else
forceError Index
hSYS.closeSocket Index
End If
Else
forceError Index
hSYS.closeSocket Index
End If
End Function
Ese es el codigo completo ya que el codigo en especifico que quiero lleva variables que estan dentro para que no se confundan que el codigo que me intereza es este:
Código:
ticketRow = HoloDB.runRead("SELECT name,ipaddress FROM sso WHERE ticket = '" & strTicket & "'") bueno e aquí, quiero que me seleccione de mi base de datos lo siguiente:
mi base de datos esta formada así: Database/sso/ticket.txt quiero que entre al txt y lea lo que esta dentro, solo eso.
Aqui tengo uno que taba cambiando pero no lo hice bien:
Código:
ticketRow = FSO.OpenTextFile(DBP & "sso\", ForWriting) 'Get the name from the sso table in the database matching this ticket
Bueno gracias.
Salu2. |