COM again
| From: | J�rg V. Bryne | Date: | Mon, 01 Oct 2001 14:37:31 +0000 |
| Subject: | COM again | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-9634@lists.php.net to get a copy of this message | ||
I'm having some trouble getting around with COM objects. Is there any way
that one can list the methods/properties of an instanciated COM object?
Also. I'm having trouble getting an ASP-script to work, so maybe someone
could help me translate? I've been staring at it for so long that I don't
see anymore :-)
(And of course, good links appreciated)
-Jørg
---
<%
'
' Logon to the Axapta COM interface
'
Set Axapta = Server.CreateObject("AxaptaConnector.Axapta")
Axapta.Logon "usah", "pass", "level", ""
'
' run Query
'
Set myRecord = Axapta.CreateRecord("CustTable")
Axapta.ExecuteStmt "select * from %1 where %1.Name == '" &
Request.Form("Username") & "' && %1.WebPassword == '"
&
Request.Form("Password") & "'",myRecord
'
' Show result
'
if myRecord.Found then
Session("AccountNum") = myRecord.Field("AccountNum")
if Request.Form("ID")<>"" then
Response.Redirect "/public.asp?id=" & Request.Form("PageID")
else
Response.Redirect "/public.asp?keyword=memberpage"
end if
else
Response.redirect "/retry.asp?ERR=" & Server.URLEncode("Bad username")
end if
Axapta.Logoff
Set Axapta = Nothing
%>
---