[thelist] Database Schema from ASP

Mike Stenhouse Mike.Stenhouse at spiritsoft.com
Tue Mar 4 11:53:14 CST 2003

Thanks for the code Scott, it's much appreciated. I just tried it myself
on my SQL Server db and got nothing but when I connected to an Access db
I'm using for a different site I got all the right info... I've had a
little play with my method of connecting to the SQL Server database -
changing from DSN to a hardcoded connection string (shown below), and
now it works fine! Any idea why that would be? There must be something
about DSN that I don't know or haven't configured...

Old Conn:

New Conn:
Provider=sqloledb;Data Source=MyDB;Initial Catalog=SpiritSoft;User

(A much happier) Mike

-----Original Message-----

I don't use JScript but your code looks fine. The VBScript
below is essentially the same and I'm getting results...

set conn = Server.CreateObject ("ADODB.Connection")
conn.Open "urConnectionString"

'set rs = conn.OpenSchema(adSchemaTables) ' 20
'set rs = conn.OpenSchema(adSchemaForeignKeys) ' 28

do while not rs.eof

  for each field in rs.fields
    response.write(field.name & " = " & field.value & "<br />"
  response.write("<hr />")



Basically a "it works for me" response ;)

FWIW, I'm running w2k sql2k. Fully SPd.


This message contains confidential information and is intended only for the named individual and may not be disseminated without prior permission.  If you are not the named addressee, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this message in error and delete this e-message from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, delayed in transmission, incomplete, or may contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this Message which arise as a result of e-mail transmission.  If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any software or services.

This email has been scanned for all viruses by the MessageLabs SkyScan
service. http://www.messagelabs.com

More information about the thelist mailing list