trevix wrote:I tried "MyConn.update" but it returns error. Are there other ways ?
I doubt it, MyConn.execute is the correct way to execute the SQL and commit the database changes in a direct connection, as far as I know.
The way I see this thing is, that you're doing nothing wrong and you won't be able to solve it by doing anything from Rev. You've
already created the record and the Access table is updated. It is
down to the Access client to refresh the recordset in order to get a view of the new record. I suspect the Access database has not been produced with any kind of concurrency in mind.
If (say) there's a noticeboard somewhere and I look at it and note down the things of interest to me and go home to study them, then when you come and add another notice on the board, it will not be visible to me until I go back and take another look at the board myself. It's not realistic for you to pin a new notice up and then chase after me with a copy of the notice and follow me home, knock on my door and hand it over (and then chase after anyone else who may have looked at the noticeboard). If I (as the Access DB client) have a particular need to make sure that I have up to date knowledge, then I'll have to make more regular trips to view the noticeboard. I think that's the problem you're facing. You could maybe make a macro to refresh the recordset by forcing a new query every time some event happens in the Access client or on demand by the user clicking a button. I don't think you can force the Access client to have visibility of the new item by inserting it into its recordset from an external source.
trevix wrote:One more thing (excuse me for not being willing to go trough tons of pages of ODBC manuals):
why this code:
Code: Select all
MyConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Documents and Settings\3vix\Desktop\db2.mdb"
does not require me to go to the ODBC panel of Window and have to set a DNS ? I know it works but will it work on any Win PC ? Is there something similar for FileMaker ?(without having to load the ODBC driver,etc)
Thanks
Trevix
Any Windows PC that has MDAC components installed should work like that - although MDAC is now replaced by Windows DAC in Vista. According to Microsoft, "Windows DAC includes some changes to work with Windows Vista, but is almost entirely functionally equivalent to MDAC 2.8." (That last sentence lifted from Wikipedia). In other words, there may be a complication to overcome with Vista installations, but probably you should be OK.
I have no knowledge of a DSNless connection for Filemaker, but that's not to say there isn't someone who does. In fact, Timothy Huertas posted this (C# code for DSNless connection)
Code: Select all
String connectionString =
"DRIVER=DataDirect 32-BIT SequeLink 5.4;" +
"UID=userid;" +//your user id
"PWD=password;" +//your password
"PRT=2399;" +
"HST=10.127.55.22;" + //your ip here
"SDSN=dbname"; //your db name
on
http://newsgroups.derkeiler.com/Archive ... 00553.html (back in 2006 but apparently the DataDirect drivers are the same ones with recent versions too). Being DSNless won't mean that you don't have to install the DataDirect drivers for the FileMaker ODBC connection though.