[Zope] RE: MSSQL7 ZSQL method works, can't use in DTML

Capesius, Alan CapesiusA@Sysmex.com
Wed, 14 Mar 2001 15:45:34 -0600


Your ODBC is set up to use the new user you created?
All Zope access to SQL will flow through the ODBC connection.
your connect string should be ODBC_DSN username password

What account Zope service runs under is irrelevant in this context as long
as that user can utilize ODBC and is using the SQL driver and security. I
haven't done alot with intergrated security models under SQL (using NT
account security). 

If the SQL Server is using integrated security model AND if Zope is running
on the desktop under Win98, it is running under the account used to login to
Windows. In this case, you must logon to Windows 98 using the NT account
that has been given the authority on SQL or you will not have ODBC access to
SQL.

Since you can browse the tables, this is working.

Look at permissions asssigned to the DTML document (make sure it's a dtml
doc). Should have Use database Methods, Access Contents, View at least. If
the user authenicated to Zope or Anonymous? 

Are you able to call the SQL Method directly (outside the management
interface)? "http://123.45.67.89/sql_method"

Your HTML tested fine here.

Alan
http://twsite.bizland.com/zopetips.htm


>>>refuses to accept anything that oughta work.  I've created a 
>>>user in MS-SQL
>>>specifically for this purpose, and it doesn't work.  My own 

>>>All of this had me thrilled, until I tried to use the ZSQL 
>>>method in a dtml
>>>document, as follows:
>>>	<dtml-var standard_html_header>
>>>	<H2>Here's SQL output:</H2>
>>>	<UL>
>>>	<dtml-in test>
>>>	   <LI><dtml-var tour_name></LI>
>>>	</dtml-in>
>>>	</UL>   
>>>	<dtml-var standard_html_footer>