Der er ikke kommet mange indlæg omkring PhoenixV, men regner faktisk også med at skifte til FCKeditor. Har lige et lille problem omkring det at hente oplysninger fra database ind i editoren. Keysersoze, kan du hurtigt hjælpe med dette? Pointene vil være dine.
Den eksisterene kode er:
<%
' Automatically calculates the editor base path based on the _samples directory.
' This is usefull only for these samples. A real application should use something like this:
' oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
Dim sBasePath
sBasePath = Request.ServerVariables("PATH_INFO")
sBasePath = Left( sBasePath, InStrRev( sBasePath, "/_samples" ) )
Dim oFCKeditor
Set oFCKeditor = New FCKeditor
oFCKeditor.BasePath = sBasePath
oFCKeditor.Value = "This is some <strong>sample text</strong>. You are using <a href=""
http://www.fckeditor.net/"">FCKeditor</a>."oFCKeditor.Create "FCKeditor1"
%>
Hvis jeg i stedet skriver:
<%
SQLserveradr="XXXXXXXXX"
SQLdatabase="XXXXXXXX"
SQLlogin="XXXXXXXXX"
SQLpassword="XXXXXXXXX"
Set Conn = Server.CreateObject("ADODB.Connection")
conStr = "driver={MySql};server="& SQLserveradr &";database="& SQLdatabase
conStr = conStr & ";uid="& SQLlogin &";pwd="& SQLpassword & ";OPTION=16386"
Conn.Open conStr
%>
<%
Id = 99
SQL = "Select * from Tabeller where Id= " & Id
Set rs = Conn.Execute(SQL)
%>
<%
' Automatically calculates the editor base path based on the _samples directory.
' This is usefull only for these samples. A real application should use something like this:
' oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
Dim sBasePath
sBasePath = Request.ServerVariables("PATH_INFO")
sBasePath = Left( sBasePath, InStrRev( sBasePath, "/_samples" ) )
Dim oFCKeditor
Set oFCKeditor = New FCKeditor
oFCKeditor.BasePath = sBasePath
oFCKeditor.Value = "This is some <strong>sample text</strong>. You are using <a href=""
http://www.fckeditor.net/"">FCKeditor</a>."oFCKeditor.Create "FCKeditor1"
%>
får jeg blot denne fejlmelding:
Microsoft VBScript runtime error '800a01f4'
Variable is undefined: 'SQLserveradr'
/FCKeditor/fckeditor/test.asp, line 46
Hvordan skal jeg forbinde og hente oplysninger fra databasen?
Virkelig på forhånd tak.