To complete with my last work ..., i do this from web ASP page:
"Requete6" is an already existing request in database.
<%
Set appAccess = CreateObject("Access.Application"
appAccess.OpenCurrentDatabase "base.mdb", False
Set db = appAccess.DBEngine.Workspaces(0).Databases(0)
Set QryDef = db.QueryDefs("Requête6"
QryDef.sql = "Select TOP 5 MyFunc([field]) from table"
appAccess.DoCmd.OpenQuery "Requête6", acViewNormal, acReadOnly
appAccess.DoCmd.TransferText acExportHTML, , "Requête6", "c:\temp\x.html", False
QryDef.Close
Set QryDef = Nothing
%>
So, i can (under ACCESS 2000) by this unique way use this function MyFunc() but the result
is not easy to exploit from the file c:\temp\x.html.
Is it possible after "DoCmd.OpenQuery" to obtain the recordset like that ?
<%
Set m_Conn = server.CreateObject("ADODB.Connection"
m_Conn.Open "eq14CVs", "", ""
SQL = "Select TOP 5 [field] as toto from table" ' MyFunc is not permit here
Set rs = m_Conn.Execute(SQL)
Do
If (rs.EOF) Then Exit Do
response.write rs("toto"
& "<br>"
rs.MoveNext
Loop
%>
I can't change my base in sqlserver.
"Requete6" is an already existing request in database.
<%
Set appAccess = CreateObject("Access.Application"
appAccess.OpenCurrentDatabase "base.mdb", False
Set db = appAccess.DBEngine.Workspaces(0).Databases(0)
Set QryDef = db.QueryDefs("Requête6"
QryDef.sql = "Select TOP 5 MyFunc([field]) from table"
appAccess.DoCmd.OpenQuery "Requête6", acViewNormal, acReadOnly
appAccess.DoCmd.TransferText acExportHTML, , "Requête6", "c:\temp\x.html", False
QryDef.Close
Set QryDef = Nothing
%>
So, i can (under ACCESS 2000) by this unique way use this function MyFunc() but the result
is not easy to exploit from the file c:\temp\x.html.
Is it possible after "DoCmd.OpenQuery" to obtain the recordset like that ?
<%
Set m_Conn = server.CreateObject("ADODB.Connection"
m_Conn.Open "eq14CVs", "", ""
SQL = "Select TOP 5 [field] as toto from table" ' MyFunc is not permit here
Set rs = m_Conn.Execute(SQL)
Do
If (rs.EOF) Then Exit Do
response.write rs("toto"
rs.MoveNext
Loop
%>
I can't change my base in sqlserver.