Hello world,
in programming anything is possible, right?
anyway
my script searches a database for a record based on a criteria value(which is a variable) then save the record in a variable record
if thats even possible.
A value is saved to the variable whenever you ask for one particular field, but that doesn't work when its an entire record.
Any suggestions/ideas on how to save an entire record then display it later
( i was thinking that i needed a array or save it one by one or something )
what i have is below NB this doesn't work
Im thinking that it would look somthing like the above
secondly,
if i there was (is) a was to save the record in a variable how would one go about displaying it. And can it be displayed using a gridview.
thanks in advance,
if there is an easier way of doing the above i am open to all suggestions.
thanks v. much
Cool nuh Man
in programming anything is possible, right?
anyway
my script searches a database for a record based on a criteria value(which is a variable) then save the record in a variable record
if thats even possible.
A value is saved to the variable whenever you ask for one particular field, but that doesn't work when its an entire record.
Any suggestions/ideas on how to save an entire record then display it later
( i was thinking that i needed a array or save it one by one or something )
what i have is below NB this doesn't work
Code:
Sub display(x as object, y as eventargs)
Dim value As String
Dim Record as srting
Dim DBConnection As Data.OleDb.OleDbConnection
Dim DBCommand As Data.OleDb.OleDbCommand
value = txtInput.Text
DBConnection = New Data.OleDb.OleDbConnection( _
"Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & Server.MapPath("PCC.mdb"))
DBConnection.Open()
record = "SELECT * FROM Accounts " & "WHERE id = '" & value & "'"
DBCommand = New OleDbCommand(record, DBConnection)
value = DBCommand.ExecuteScalar
DBConnection.Close()
End Sub
.......
<form>
<asp:textbox runat=server id=txtinput />
<asp:button runat=server id=btn onclick=display />
</form>
secondly,
if i there was (is) a was to save the record in a variable how would one go about displaying it. And can it be displayed using a gridview.
thanks in advance,
if there is an easier way of doing the above i am open to all suggestions.
thanks v. much
Cool nuh Man