SQL Question - GUF related
I'm moving forward in working with the GenericUserFolder. I'm adding a database interface to pull user names out of a database table. I have created an MS Access database with a couple of users. I have created an ODBC connection object in my acl_users folder and tested it to make sure it works. I then created a SQL method called "getUserList()" which should answer a collection of user ids. Using the Test feature, I get back expected results. I tried to change the userList method defined for my GenericUserFolder to use these results. Basically I do the following: <dtml-return "getUserList()"> However, when I click on the UserList tab, I get no names. I've tested the SQLmethod and it works fine. I also created another method, called testList which just contains the following: jwh jorge If I use testList in my userList method, I get the expected results. I'm sure that I'm doing something stupid, but for the life of me I can't figure out why the userList method fails when I access a SQLMethod but not when I access a DTMLMethod. Another thing, if I try to "view" my userList method when it references the SQLMethod, I get a resource not found error, but when I view the method when it references a DTMLMethod, I get the two names. Any ideas on what is going on here? I'm assuming it has something to do with the way the SQLMethod answers its results? Thanks. James W. Howe mailto:jwh@allencreek.com Allen Creek Software, Inc. pgpkey: http://ic.net/~jwh/pgpkey.html Ann Arbor, MI 48103
On Mon, 14 Feb 2000, James W. Howe wrote:
expected results. I tried to change the userList method defined for my GenericUserFolder to use these results. Basically I do the following:
<dtml-return "getUserList()">
I think this should work, provided the column that contains the username is called 'uname' or 'username'. Make sure you grant the DTML method a proxy role (eg. Manager) so it can access the ZSQL method. In this particular case, it is actually possible to just call your ZSQL method userList and it will all work. This trick only works on the userList hook however as it isn't called with parameters.
access a DTMLMethod. Another thing, if I try to "view" my userList method when it references the SQLMethod, I get a resource not found error, but when I view the method when it references a DTMLMethod, I get the two
Don't know whats going on here. The traceback that occurs when you choose the 'view' tab on your userList method is needed to debug this. -- ___ // Zen (alias Stuart Bishop) Work: zen@cs.rmit.edu.au // E N Senior Systems Alchemist Play: zen@shangri-la.dropbear.id.au //__ Computer Science, RMIT WWW: http://www.cs.rmit.edu.au/~zen
participants (2)
-
James W. Howe -
Stuart 'Zen' Bishop