Tengo un problema, es el siguiente.
he elaborado un foro para mis compañeros de mi curso de microsoft para discutir clases etc...
pero en vista de que es elaboracion propia y no tiene fines lucrativos ni publicitarios, tenia pensado montarlo en un hosting gratuito con soporte asp. En vista de que el codigo me pide la direccion completa ejemplo (C:/inetpub/wwwroot/etc....) no pueo acceder a la base de datos porque lo unico que tengo es la direccion web (k.1asphost.com/etc..) quisiera saber si existe otra forma de llamar a mi base de datos!
pego aqui mi codigo del archivo common.asp (archivo que llama a la base de datos)!!
_______________________________________________
<%
'supply some settings
Const AppPath = "http://k.1asphost.com/tantradj/cforums/"
Const DBName = "db.mdb"
Const AvatarPath = "./avatars/"
Const EmoticonPath = "./emoticons/"
Const MainPage = "./index.asp"
Dim DB, rsUser, rsMessage, rsTopic, rsForum, rsSection, rsSettings, rspMessage, UserCount, PostCount, TopicCount
'open the database
Set DB = CreateObject("DAO.DBEngine.36").Workspaces(0).Open Database(AppPath & DBName,,True)
Set rsUser = DB.OpenRecordset("User")
Set rsMessage = DB.OpenRecordset("Message")
Set rsTopic = DB.OpenRecordset("Topic")
Set rsForum = DB.OpenRecordset("Forum")
Set rsSection = DB.OpenRecordset("Section")
Set rsSettings = DB.OpenRecordset("Settings")
Set rspMessage = DB.OpenRecordset("pMessage")
'get some counts
UserCount = rsUser.RecordCount
PostCount = rsMessage.RecordCount
TopicCount = rsTopic.RecordCount
'Get the RC4Key from the database
Dim RC4Key
RC4Key = GetRC4Key("RC4Key", "Value1")
'get RC4Key (same as funcGetSetting.inc with different function name)
Function GetRC4Key(Setting, ValName)
rsSettings.MoveFirst
rsSettings.Index = "Setting"
rsSettings.Seek "=", Setting
If rsSettings.NoMatch = False Then
With rsSettings
GetRC4Key = .fields(ValName).value
End With
Else
GetRC4Key = ""
End If
End Function
'RC4 Function for encryption
'found at
http://rossm.net/Electronics/Compute...tware/ASP/#RC4
Function RC4(ByRef Key, ByRef Data)
Dim KeyBytes(255)
Dim CypherBytes(255)
KeyLen=Len(Key)
if KeyLen=0 Then Exit function
KeyText=Key
For i=0 To 255
KeyBytes(i)=Asc(Mid(Key, ((i) Mod (KeyLen))+1, 1))
Next
if Len(Data)=0 Then Exit function
For i=0 To 255
CypherBytes(i)=i
Next
Jump=0 'Swap values of Cypher around based on index and KeyText value
For i=0 To 255 'Find index To switch
Jump=(Jump+CypherBytes(i)+KeyBytes(i)) Mod 256
Tmp=CypherBytes(i) 'Swap
CypherBytes(i)=CypherBytes(Jump)
CypherBytes(Jump)=Tmp
Next
i=0
Jump=0
For X=1 To Len(Data)
i=(i+1) Mod 256
Jump=(Jump+CypherBytes(i)) Mod 256
T=(CypherBytes(i)+CypherBytes(Jump)) Mod 256
Tmp=CypherBytes(i) 'Swap
CypherBytes(i)=CypherBytes(Jump)
CypherBytes(Jump)=Tmp
RC4=RC4 & Chr(Asc(Mid(Data, X, 1)) Xor CypherBytes(T)) 'Character Encryption
Next
End function
%>
________________________________________________
agradeceria que alguien me ayudara, ya que esto me puede ayudar con mi nota!!!!
ATTE Ernesto Flames
Aspirante a Microsoft Certified Professional