I have a VB application in which I connect to a database using OLE DB for ODBC drivers and DataEnvironment. The problem is that I'm not using neither SQL Server nor MSDE. So I ask, if someone could tell me, is it necessary to use ODBC or is better to use JET ? And what are the advantages/disadvantages between JET and ODBC ?
I have another problem: I'm using DataEnvironment and I have connection to a database (I've tried both with ODBC and JET). I put a DataGrid control on a form, which shows the records from a the table Tb1. The DataGrid control is bound to DataEnvironment, to a command which gets data fro Tb1. Then I manually create another ADODB connection, and I insert a record in Tb1, like this:
Dim MyConn as New ADODB.Connection
MyConn.ConnectionString = "......"
MyConn.Open
MyConn.Execute "INSERT INTO bla bla ..."
This operation goes well, the record is added in Tb1, but the problem comes when I try to requery the DataGrid, because it doesn't requery the first time I call the requery procedure. I did the requery operation in two ways, which I'M SURE THEY'RE BOTH CORRECT, I also rebind the DataGrid control, but I still can't understand why I have to click two times the requery button in order to see in the DataGrid the newly added record. I wanna say that the problem doesn't come from the DataGrid, but from the recordset of DataEnvironment, because I made a procedure to display the records from the recordset and after the first requery, it doesn't have the new record, it shows the correct records only after the second requery operation.
I would really appreciate if someone could help me solve at least one of the problems above.
Thanx in advance.
I have another problem: I'm using DataEnvironment and I have connection to a database (I've tried both with ODBC and JET). I put a DataGrid control on a form, which shows the records from a the table Tb1. The DataGrid control is bound to DataEnvironment, to a command which gets data fro Tb1. Then I manually create another ADODB connection, and I insert a record in Tb1, like this:
Dim MyConn as New ADODB.Connection
MyConn.ConnectionString = "......"
MyConn.Open
MyConn.Execute "INSERT INTO bla bla ..."
This operation goes well, the record is added in Tb1, but the problem comes when I try to requery the DataGrid, because it doesn't requery the first time I call the requery procedure. I did the requery operation in two ways, which I'M SURE THEY'RE BOTH CORRECT, I also rebind the DataGrid control, but I still can't understand why I have to click two times the requery button in order to see in the DataGrid the newly added record. I wanna say that the problem doesn't come from the DataGrid, but from the recordset of DataEnvironment, because I made a procedure to display the records from the recordset and after the first requery, it doesn't have the new record, it shows the correct records only after the second requery operation.
I would really appreciate if someone could help me solve at least one of the problems above.
Thanx in advance.