My input box is named TxtUser on my html page
Dim ArrayData(3, 3) As String
Dim intRow As Integer = 0
Dim strUser As String
Dim strPass As String
Dim ArrayLog() As String = {strUser, strPass}
Dim con As New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source =C:\Users\Nathaniel More\My Web Site\ubuntu\base\datalogin.accdb;Persist Security Info=False;")
Dim StrSQL As String = "INSERT INTO DATALOGIN(LOGIN, PASSWORD) values(@loguser, @logpass)"
Dim command As New OleDbCommand()
For intColumn = 0 To 1
ArrayLog(intColumn, intRow) = ArrayLog(intColumn)
Next intColumn
intRow += 1
command.CommandText = StrSQL 'Tells it that command is going to be text
command.Connection = con 'Set the conection = to con
command.Parameters.Clear() ' Clear the all parameters
Dim ParameterDate As New OleDbParameter 'Set up the Parmeter for the date field in the data base
ParameterDate.ParameterName = "@loguser"
ParameterDate.OleDbType = OleDbType.Char
ParameterDate.Size = 100
ParameterDate.Direction = ParameterDirection.Input
ParameterDate.Value = ArrayLog(0)
Dim ParameterTime As New OleDbParameter 'Set up the Parmeter for the time field in the data base
ParameterTime.ParameterName = "@logpass"
ParameterTime.OleDbType = OleDbType.Char
ParameterTime.Size = 100
ParameterTime.Direction = ParameterDirection.Input
ParameterTime.Value = ArrayLog(1)
'Now that the parmeters have been defined add them
command.Parameters.Add(ParameterDate)
command.Parameters.Add(ParameterTime)
con.Open()
command.ExecuteNonQuery()
con.Close()

New Topic/Question
Reply




MultiQuote




|