All pastes #23669 Raw Edit

Anonymous

public text v1 · immutable
#23669 ·published 2005-09-23 05:14 UTC
rendered paste body
dim adoConn 

Dim R

dim counter

set adoConn = CreateObject("ADODB.Connection") 
Set R = CreateObject("ADODB.Recordset")

adoConn.Open "DSN=Mag" 

if adoConn.errors.count = 0 then

'write "<h2>test:</h2>"

SQL = "select * from Mailings"


adoConn.Execute SQL
'R.Open SQL, adoConn, adOpenStatic, adLockReadOnly, adCmdText

'write R.name
'write "<br>"


else

write "ERROR: Couldn't connect to database"
for each objErr in adoConn.Errors
  write("<p>")
  write("Description: ")
  write(objErr.Description & "<br />")
  write("Help context: ")
  write(objErr.HelpContext & "<br />")
  write("Help file: ")
  write(objErr.HelpFile & "<br />")
  write("Native error: ")
  write(objErr.NativeError & "<br />")
  write("Error number: ")
  write(objErr.Number & "<br />")
  write("Error source: ")
  write(objErr.Source & "<br />")
  write("SQL state: ")
  write(objErr.SQLState & "<br />")
  write("</p>")
next



end if