Forums: [SOLVED] Simple database connection - Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

[SOLVED] Simple database connection Connect database and add field values to varabels Rate Topic: -----

#1 User is offline   Franke 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 8
  • Joined: 05-March 08

Posted 30 August 2017 - 08:12 AM

I've had success doing this in version 7, but so far cost a lot of time in ver.9

The task is pritty simple, after suksessful login I want to add the value of a database field to a session-variable.

The field "Consern" defined in the same SQL tabel as user/password.
Do I need to open a recordset (this is what i've done in simular applications) - or kan I use a ASPRunner-function?

Anyway, here is the code I'm trying with no success.

Dim strSQL
strSQL = "select Consern from dbo.RingSept where username = 1234;"


Dim rstDBEdit
Set rstDBEdit = Server.CreateObject("ADODB.Recordset")
rstDBEdit.Open strSQL, Conn,1,2
consern = rstDBEdit.fields("consern")
rstDBEdit.Close
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic