Click here to Skip to main content
15,910,234 members
Home / Discussions / Database
   

Database

 
GeneralData migration from Oracle8 to Oracle9 Pin
sergunya5-Mar-02 20:47
sergunya5-Mar-02 20:47 
GeneralUnable to initialize DAO/Jet db engine Pin
Obliterator5-Mar-02 11:27
Obliterator5-Mar-02 11:27 
GeneralRe: Unable to initialize DAO/Jet db engine Pin
Michael P Butler5-Mar-02 22:28
Michael P Butler5-Mar-02 22:28 
GeneralRe: Unable to initialize DAO/Jet db engine Pin
Obliterator6-Mar-02 3:42
Obliterator6-Mar-02 3:42 
GeneralRe: Unable to initialize DAO/Jet db engine Pin
Blade[DMS]28-Mar-02 1:50
Blade[DMS]28-Mar-02 1:50 
GeneralRe: Unable to initialize DAO/Jet db engine Pin
Obliterator28-Mar-02 6:31
Obliterator28-Mar-02 6:31 
QuestionHow to store an object into a database? Pin
5-Mar-02 9:24
suss5-Mar-02 9:24 
GeneralI was wondering Pin
mrthump4-Mar-02 2:44
mrthump4-Mar-02 2:44 
ok I have problems with understanding somethings at times, and even a hard time explaining things. so here goes. i have a database it holds certain info a username, a password, a contact, a Studentname, and a set of rotations 1-9. ok say you have a set of fields you want to update based upon the username you picked on the previous page how would you go about it? The problem I find is that the update updates the first record in the database not the record i was looking at.can anyone help? constructive help only please!!! here is my code so far.....





<%@ Language="VBScript" %>


<%

Student=request.querystring("Student")



dim TitleChoice
Set TitleChoice = Server.CreateObject("ADODB.Recordset")

With TitleChoice
.ActiveConnection = connLoginUserData
.Source = "SELECT * FROM TitleChoice"
.CursorType = 3
.CursorLocation = 2
.LockType = 3
.Open()
End With
%>
<%
Dim strErrorMessage ' String used to display an error message.
Dim rsUser ' References the user recordset.
Dim rsUserLog ' References the user log recordset.
Dim strEmailTo
Dim strEmailFrom
Dim strSubject
Dim strBody


If Len(Request.Form("Submit")) > 0 Then
If Len(Request.Form("StudentName")) > 0 Then
If Len(Request.Form("Email")) > 0 Then

Set rsUser = Server.CreateObject("ADODB.Recordset")
With rsUser
.ActiveConnection = connLoginUserData
.Source = "Select * FROM tblUsers WHERE StudentName='" & Student & "';"
.CursorType = 3
.CursorLocation = 2
.LockType = 3
.Open()
.Fields("Email") = Request.Form("Email")
.Fields("Rotation1") = Request.Form("Rotation1")
.Fields("Rotation2") = Request.Form("Rotation2")
.Fields("Rotation3") = Request.Form("Rotation3")
.Fields("Rotation4") = Request.Form("Rotation4")
.Fields("Rotation5") = Request.Form("Rotation5")
.Fields("Rotation6") = Request.Form("Rotation6")
.Fields("Rotation7") = Request.Form("Rotation7")
.Fields("Rotation8") = Request.Form("Rotation8")
.Fields("Rotation9") = Request.Form("Rotation9")
.Fields("UserName") = Request.Form("StudentName")
.Fields("Password") = "student"
.Fields("Contact") = Request.Form("Contact")
.Fields("Address") = Request.Form("Address")
.Fields("AccessAllowed") = True
.Update

End With

Response.Redirect "/default.asp"

Else
strErrorMessage = "Please enter an email address."
End If

Else
strErrorMessage = "Please enter the students name."
End If
End If

%>







<title>Student Update Wizard


























Student Update Form (All fields required)
<%
If Len(Request.Form("Submit")) > 0 AND Len(strErrorMessage) > 0 Then
Response.Write "
" & strErrorMessage
End If
%>


Student Full Name:

(First and Last)





<%=rsUser("StudentName")%>

Student Contact Name:





<%=rsUser("Contact")%>

Student Address:





<%=rsUser("Address")%>

Email Address:





<%=rsUser("Email")%>

Rotation1




Titles
<%
on error resume next
TitleChoice.MoveFirst
do while not TitleChoice.eof
title=TitleChoice("title")

%>
"><%=title%>
<%
TitleChoice.movenext
loop
%>


<%=rsUser("Rotation1")%>

Rotation2




Titles
<%
on error resume next
TitleChoice.MoveFirst
do while not TitleChoice.eof
title=TitleChoice("title")

%>
"><%=title%>
<%
TitleChoice.movenext
loop
%>


<%=rsUser("Rotation2")%>

Rotation3




Titles
<%
on error resume next
TitleChoice.MoveFirst
do while not TitleChoice.eof
title=TitleChoice("title")

%>
"><%=title%>
<%
TitleChoice.movenext
loop
%>


<%=rsUser("Rotation3")%>

Rotation4




Titles
<%
on error resume next
TitleChoice.MoveFirst
do while not TitleChoice.eof
title=TitleChoice("title")

%>
"><%=title%>
<%
TitleChoice.movenext
loop
%>


<%=rsUser("Rotation4")%>

Rotation5




Titles
<%
on error resume next
TitleChoice.MoveFirst
do while not TitleChoice.eof
title=TitleChoice("title")

%>
"><%=title%>
<%
TitleChoice.movenext
loop
%>


<%=rsUser("Rotation5")%>

Rotation6




Titles
<%
on error resume next
TitleChoice.MoveFirst
do while not TitleChoice.eof
title=TitleChoice("title")

%>
"><%=title%>
<%
TitleChoice.movenext
loop
%>


<%=rsUser("Rotation6")%>

Rotation7




Titles
<%
on error resume next
TitleChoice.MoveFirst
do while not TitleChoice.eof
title=TitleChoice("title")

%>
"><%=title%>
<%
TitleChoice.movenext
loop
%>


<%=rsUser("Rotation7")%>

Rotation8




Titles
<%
on error resume next
TitleChoice.MoveFirst
do while not TitleChoice.eof
title=TitleChoice("title")

%>
"><%=title%>
<%
TitleChoice.movenext
loop
%>


<%=rsUser("Rotation8")%>

Rotation9




Titles
<%
on error resume next
TitleChoice.MoveFirst
do while not TitleChoice.eof
title=TitleChoice("title")

%>
"><%=title%>
<%
TitleChoice.movenext
loop
%>


<%=rsUser("Rotation9")%>

 









Smile | :)
GeneralSQL and newid() Pin
Michael P Butler2-Mar-02 6:34
Michael P Butler2-Mar-02 6:34 
GeneralRe: SQL and newid() Pin
Michael P Butler2-Mar-02 10:10
Michael P Butler2-Mar-02 10:10 
GeneralADO: How to check if dBase-Record is deleted Pin
28-Feb-02 21:09
suss28-Feb-02 21:09 
GeneralRe: ADO: How to check if dBase-Record is deleted Pin
AlexEg11-Mar-02 2:37
AlexEg11-Mar-02 2:37 
GeneralSpeaking of databases Pin
Jon Sagara28-Feb-02 8:38
Jon Sagara28-Feb-02 8:38 
GeneralRe: Speaking of databases Pin
Carlos Antollini28-Feb-02 8:50
Carlos Antollini28-Feb-02 8:50 
QuestionADO question ??? Pin
jancsi25-Feb-02 22:41
jancsi25-Feb-02 22:41 
GeneralAccess 2000 ODBC weirdness Pin
Michael Martin22-Feb-02 12:14
professionalMichael Martin22-Feb-02 12:14 
GeneralSQL Server Transact SQL Pin
Michael Martin22-Feb-02 12:13
professionalMichael Martin22-Feb-02 12:13 
GeneralRe: SQL Server Transact SQL Pin
Li Mu Bai25-Feb-02 4:27
Li Mu Bai25-Feb-02 4:27 
GeneralRe: SQL Server Transact SQL Pin
Cliff Dabrowski25-Feb-02 5:06
Cliff Dabrowski25-Feb-02 5:06 
GeneralRe: SQL Server Transact SQL Pin
Carlos Antollini25-Feb-02 4:58
Carlos Antollini25-Feb-02 4:58 
GeneralOracle on Unix Pin
Paul Selormey18-Feb-02 19:56
Paul Selormey18-Feb-02 19:56 
GeneralRe: Oracle on Unix Pin
sergunya5-Mar-02 20:55
sergunya5-Mar-02 20:55 
GeneralRe: Oracle on Unix Pin
Paul Selormey5-Mar-02 21:46
Paul Selormey5-Mar-02 21:46 
GeneralCursel type and datagrid Pin
Mazdak18-Feb-02 5:13
Mazdak18-Feb-02 5:13 
GeneralRe: Cursel type and datagrid Pin
Andres Manggini20-Feb-02 16:15
Andres Manggini20-Feb-02 16:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.