I have the following dilemma: I have a database with vendors
Vend_codigo following structure, Vend_Descripcion, Vend_Clave
I want the user to place their code and if I show your name then confirm with your password to pass up
You always bring me one seller's description I think the problem is
the cursor1.position = 0 as I do to that position with the entry that the user
From already thank you very much for your time
I show some lines for better understanding
Sub Process_Globals
Dim SQLVEND As SQL
Dim DBFileName As String : DBFileName = "vend.s3db"
Dim DBFileDir As String : DBFileDir = File.DirInternal
'Dim DBFileDir As String : DBFileDir = File.DirRootExternal
Dim DBTableName As String : DBTableName = "vendedor"
Dim ColumnName(3) As String ' names of columns fields
ColumnName(0) = "vend_codigo"
ColumnName(1) = "vend_descripcion"
ColumnName(2) = "vend_clave"
Sub edOperador_EnterPressed
If edOperador.Text.Length =0 Then ' si el dato space obliga a poner dato y retorna el focus
Msgbox("Error debe colocar el numero de operador","")
edOperador.RequestFocus
Return
End If
SQLReadVend
End Sub
Sub SQLReadVend
Dim i As Int
Dim Cursor1 As Cursor
Dim txt As String
Dim entrada As String
Dim e As String
entrada = edOperador.Text
txt = "SELECT * FROM " & DBTableName
Cursor1 = SQLVEND.ExecQuery(txt) ' reads the new database
Cursor1.Position = 0
'Cursor1 = SQLVEND.ExecQuery("SELECT * FROM DBTableName WHERE Vend_Codigo LIKE entrada ")
'Cursor1 = SQLVEND.ExecQuery("SELECT * FROM DBTableName WHERE ID = entrada")
'txt = "SELECT * FROM " & DBTableName & " WHERE " & Vend_Codigo & " = " & entrada
'Cursor1 = SQLVEND.ExecQuery(txt) ' reads the new database
edNombreVend.text=Cursor1.GetString(ColumnName(1))
'e.Text = Cursor1.GetString(vend_descripcion)
'Msgbox(e.text,"3")
'Cursor1.Position = 0
'Log("hola")
'Log(Cursor1.ColumnCount)
End Sub
Vend_codigo following structure, Vend_Descripcion, Vend_Clave
I want the user to place their code and if I show your name then confirm with your password to pass up
You always bring me one seller's description I think the problem is
the cursor1.position = 0 as I do to that position with the entry that the user
From already thank you very much for your time
I show some lines for better understanding
Sub Process_Globals
Dim SQLVEND As SQL
Dim DBFileName As String : DBFileName = "vend.s3db"
Dim DBFileDir As String : DBFileDir = File.DirInternal
'Dim DBFileDir As String : DBFileDir = File.DirRootExternal
Dim DBTableName As String : DBTableName = "vendedor"
Dim ColumnName(3) As String ' names of columns fields
ColumnName(0) = "vend_codigo"
ColumnName(1) = "vend_descripcion"
ColumnName(2) = "vend_clave"
Sub edOperador_EnterPressed
If edOperador.Text.Length =0 Then ' si el dato space obliga a poner dato y retorna el focus
Msgbox("Error debe colocar el numero de operador","")
edOperador.RequestFocus
Return
End If
SQLReadVend
End Sub
Sub SQLReadVend
Dim i As Int
Dim Cursor1 As Cursor
Dim txt As String
Dim entrada As String
Dim e As String
entrada = edOperador.Text
txt = "SELECT * FROM " & DBTableName
Cursor1 = SQLVEND.ExecQuery(txt) ' reads the new database
Cursor1.Position = 0
'Cursor1 = SQLVEND.ExecQuery("SELECT * FROM DBTableName WHERE Vend_Codigo LIKE entrada ")
'Cursor1 = SQLVEND.ExecQuery("SELECT * FROM DBTableName WHERE ID = entrada")
'txt = "SELECT * FROM " & DBTableName & " WHERE " & Vend_Codigo & " = " & entrada
'Cursor1 = SQLVEND.ExecQuery(txt) ' reads the new database
edNombreVend.text=Cursor1.GetString(ColumnName(1))
'e.Text = Cursor1.GetString(vend_descripcion)
'Msgbox(e.text,"3")
'Cursor1.Position = 0
'Log("hola")
'Log(Cursor1.ColumnCount)
End Sub