jemckinney
MIS
I have been through so many different sites and asp.net books and still just cannot get this to work and feel like an idiot! What I have is a form where the user enters two fields. I need to take these two fields plus four more and display the information to the screen and also write it to another database to keep up with what the users are doing. I've been working on this gotta be simple step forever! I haven't even tried writting it to the other DB yet, just to display the information. Here's the last bit of code I have tried: (form and display items are currently separate pages):
DIM cmdSelectStudent As SqlCommand
DIM dtrStudents As SqlDataReader
cmdSelectStudent = New SqlCommand ("Select cpsstatus, lastname, firstname, ssn from @table where ssn=@ssn")
dtrStudents = cmdSelectStudent.ExecuteReader()
While dtrStudents.Read()
Response.Write(dtrStudents("lastname", "firstname", "@ssn", "cpsstatus" ))
End While
dtrStudents.Close()
conDB.Close()
This was the last one I have tried which is completely different than the other ways (which I do not have).
Please help...
DIM cmdSelectStudent As SqlCommand
DIM dtrStudents As SqlDataReader
cmdSelectStudent = New SqlCommand ("Select cpsstatus, lastname, firstname, ssn from @table where ssn=@ssn")
dtrStudents = cmdSelectStudent.ExecuteReader()
While dtrStudents.Read()
Response.Write(dtrStudents("lastname", "firstname", "@ssn", "cpsstatus" ))
End While
dtrStudents.Close()
conDB.Close()
This was the last one I have tried which is completely different than the other ways (which I do not have).
Please help...