Dear all,
Iam Using MSSQL Database in Backend and it is very well working in old versions of B4a but not working in B4a Version 7.80 and my code is mention below :
after successfull login i called a new activity called 'Lyloggedin' and from there iam trying to insert some data in a table with the help of two textboxes and one command button. But data is not inserting in table also it didn't shows any error in the codes. My codes are given below :
Now iam getting confused because same code is already running in old versions of B4A. Then why it is not inserting data from latest version.
For that i tested it once again and found that we call data , view data and delete data but the only thing which is not working is , it can't insert data. why?..
Is there any one to help me...
Iam Using MSSQL Database in Backend and it is very well working in old versions of B4a but not working in B4a Version 7.80 and my code is mention below :
B4X:
Sub Activity_Create(FirstTime As Boolean)
a.setDatabase("ip address","database","userid","Password")
Activity.LoadLayout("Login")
End Sub
after successfull login i called a new activity called 'Lyloggedin' and from there iam trying to insert some data in a table with the help of two textboxes and one command button. But data is not inserting in table also it didn't shows any error in the codes. My codes are given below :
B4X:
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals
Private Ename As Label
Private Lage As Label
Private Tname As EditText
Private Tage As EditText
Private Sdata As Button
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Lyloggedin")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub Sdata_Click
If Tname.text = "" Then
Msgbox("Please Enter Name","")
Return
Else
Dim OP As String
OP = Main.a.Query("INSERT INTO testnew (Name, Age) OUTPUT Inserted.ID VALUES(" & Tname.Text &", "& Tage.Text &")SELECT SCOPE_IDENTITY()")
OP = ""
Msgbox("Data Submitted Successfully","")
End If
End Sub
Now iam getting confused because same code is already running in old versions of B4A. Then why it is not inserting data from latest version.
For that i tested it once again and found that we call data , view data and delete data but the only thing which is not working is , it can't insert data. why?..
Is there any one to help me...