The record collection Access db

Results 1 to 3 of 3

Thread: The record collection Access db

  1. #1
    fred Guest

    Default The record collection Access db

    How can I get at the field properties of the record collection (?) (for an Access Database)?.<BR><BR>I have a record set created using a DSN but that gives me a recordset with only two properties: Name & count.<BR><BR>I need the data type. I have an example in VBScript but this makes little sense to me.<BR><BR>Can anyone give me an example code that shows this.<BR><BR>I would be eternally grateful<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: The record collection Access db

    for (i=0;i&#060;rst.Fields.Count() -1; i++) {<BR><BR>Response.Write(rst.Fields(i).type);<BR><B R>}<BR><BR>HTH<BR>dave

  3. #3
    Fred Guest

    Default RE: The record collection Access db

    Dave<BR><BR>Sorry to be a pain but heere it is amd i get a 500. Any thoughts<BR><BR>&#060;%<BR>DSN = "DSN=esyste.juniorgolf";<BR>Conn = Server.CreateObject("ADODB.Connection");<BR>Conn.O pen(DSN);<BR>var id = String(Request("id"));<BR>var tabletoedit = String(Request("tablename"));<BR>/* Set session variable for return to calling page<BR>*/<BR>Session("tabletoedit")=tabletoedit;<BR>var editordelete = String(Request("editordelete"));<BR>field_array = new Array();<BR>field_datatype_array = new Array();<BR>out = "";<BR>if(editordelete=="Delete") {<BR> sql="delete * from " + tabletoedit + " where id=" + id + ";";<BR> Conn.Execute(sql);<BR> out += "Deleted from " + tabletoedit + " - row with id = " + id;<BR><BR>}<BR>else<BR>{<BR> /* Get field names so can identify passed form fields */<BR> sql="SELECT * from " + tabletoedit ;<BR> rs = Server.CreateObject("ADODB.RecordSet");<BR> rs.Open (sql,Conn);<BR> /* Update row <BR> field_array contains field name<BR> tabletoedit contains tablename<BR> id equals primary key of row<BR> field content is in form variables with same name as column<BR> <BR> */<BR> nooffields = rs.fields.count;<BR> out="";<BR> for (i=0;i&#060;rst.Fields.Count() -1; i++) { <BR><BR> out += Response.Write(rst.Fields(i).type); <BR><BR> } <BR><BR>Thanks in hope<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts