BTW
I discovered something.. it might guide us to somewhere
I wrote code which after reestablishing connection is trying refresh links every 30 seconds and i found out that that it succeed to refresh link after 20-25 times trying (aprox.700sec/11min) so it seems old connection has been kept that time
User Profile
Collapse
-
MBMSOFT replied to reset or drop database connection to the sql server and refresh links to the tablesin Accessi have tried in the past to use server name instead of ip adress in conn string but not always was that successfully (sometimes it happened some confusen that server name was not recognized in the network) i'm trying now to use servername and i'll seeLeave a comment:
-
MBMSOFT replied to reset or drop database connection to the sql server and refresh links to the tablesin Accessnot at all... just the code... i thought the same, that there might some object keep connection ... and just used only the code but again is the sameLeave a comment:
-
MBMSOFT replied to reset or drop database connection to the sql server and refresh links to the tablesin Accesswhen i put line currentproject. openconnection in code 7 as you wrote
I got err message 2467 the expression you entered refers to object that is closed or doesn't existsLeave a comment:
-
MBMSOFT replied to reset or drop database connection to the sql server and refresh links to the tablesin Accessare those articles could be usefully with this issue
http://support.microsoft.com/kb/216950
http://msdn.microsoft.com/en-us/library/ms810829.aspx...Leave a comment:
-
MBMSOFT replied to reset or drop database connection to the sql server and refresh links to the tablesin AccessI always get the same message before and after connection fails
Code:PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=C:\Projects\ACCESS\mbm_soft\OTN\OTN.mdb;PERSIST SECURITY INFO=FALSE;Jet OLEDB:System database=C:\Documents and Settings\Administrator\Application Data\Microsoft\Access\System.mdw
Leave a comment:
-
MBMSOFT replied to reset or drop database connection to the sql server and refresh links to the tablesin Accessyes i tried your code as well
but the problem remain...
when I lost connection to the sql server I can't refresh links to the tables.
before connection has been lost ... I can refresh or relink tables as much times I want...
but after losing connection (I'm connecting to the sql server through VPN connection) and reconnecting to sql server I can't any more refresh links with code...
I must close...Leave a comment:
-
MBMSOFT replied to reset or drop database connection to the sql server and refresh links to the tablesin AccessI send a short way of dao connection... in my code is written as you wrote...
In mean time i found something interesting, it might help that one
I open systable MSysObjects so
access write links inside, when i delete link manually or with code, the link in systable still exists,
if i restart access if the link has been deleted before closing, it no exists anymore in MSysObjects
and you can relink table...Leave a comment:
-
MBMSOFT replied to reset or drop database connection to the sql server and refresh links to the tablesin AccessAccess 2003
The error is 3146 odbc call failed
So if connection is broken/lost when i connect again a can't refresh links to the sql server table, i have to restart mdb/mde
A tried as well to delete linked tables
And recreate them and again does not help
Only what i can
Only way i can relink is to change ip adress in conn.string
Eg 192.124.0.2(1st ip- router server ip) and...Last edited by zmbd; Sep 4 '14, 02:56 PM. Reason: [z{please do not yell. Posts consisting of either All, or mostly, UPPERCASE text is considered to be yelling... besides, it's hard on the eyes}]Leave a comment:
-
MBMSOFT replied to reset or drop database connection to the sql server and refresh links to the tablesin AccessI tried different methods like ado,dao, and vba docmd.transferd atabase,aclink. .
ex. dao method
...Code:Function dao() tbl = "MyTable" CurrentDb.TableDefs.Delete tbl Set A = CurrentDb() Set B = A.CreateTableDef(tbl) B.Connect = "ODBC;driver={SQL Server};Server=MyServer;database=MyDataBase;uid=My User;pwd=MyPasword;" B.SourceTableName = tbl A.TableDefs.AppendLeave a comment:
-
MBMSOFT started a topic reset or drop database connection to the sql server and refresh links to the tablesin Accessreset or drop database connection to the sql server and refresh links to the tables
I have MDB database linked to SQL SERVER through VPN connection...
I created links to the sql server ..
Links are dsnless...
Everything works fine but when I lost VPN connection or sql connection has been broken I can't refresh links to the tables.
I receive message 3146 sql connection failed
I must close database and start again...
I tried different methods like ado,dao, and vba docmd.transferd atabase,aclink. .....Last edited by zmbd; Sep 4 '14, 11:43 AM. Reason: [z{Please don't post questions to the Insight Articles. You deserve your own thread! (^_^) }] -
Finally I found solution.. it simple, so if someone need this here it is>>>
1.In Control Panel > Regional and language options> advanced tab
choose the native language you want to use in language for non-unicode programs
2.In VBA editor choose tools>options>e ditor format> font which support your language
and it will work fineLeave a comment:
-
I found the way how to manage this issue , so if it is halpfull for someone here it is:
...Code:Private Declare Function ActivateKeyboardLayout Lib _ "user32.dll" (ByVal myLanguage As Long, Flag As Boolean) As Long 'define your desired keyboardlanguage 'find your desired language at [url]http://www.trigeminal.com/frmrpt2dap.asp[/url] Private Const MKD = 1071 'macedonian keyboard language
Leave a comment:
-
MBMSOFT started a topic How to make vba to read and understand characters in other keyboard languagein Visual BasicHow to make vba to read and understand characters in other keyboard language
How to make vba to read and understand characters in other keyboard language
e.g
*************** *************** *************** *******
Private Sub A_AfterUpdate()
If Not IsNull(Me.A) Then
' This is not understandable for vba and in editor is writen with
' unureadable characters
If Trim(Me.A) = "ХШЃЧЌЧЧЃ ШЏФЊЕФР"... -
Any idea how to change system KEYBOARD LANGUAGE with vba
Any idea how to change system keyboard language with vba
I tried changing keyboard property in the control property and it works
but i need change in one control only, and if i change property it change for all contols after
so i need code on exit control event to change the system keyboard language
\e.g.
*************** *************** *************** *******
Private Sub A_Enter()... -
thanks... i trie'd it and it works
But, i'm not sure if it's the best solution that I change the local date settings..
it should be some way that VB can ignore or convert date format while the application is running..
I found some code that is doing some conversion but doesn't work as follow:
Private Declare Function GetTimeZoneInfo rmation Lib "kernel32" _
(lpTimeZoneInfo rmation As TIME_ZONE_INFOR MATION)...Leave a comment:
-
let's say that I've used this format :
dd.mm.yyyy
in some certain control
and the local date format settings is:
yyyy-mm-dd
then if I use
format(ctl,"ww" ) result is false
or if i've write in table date in one format all further action can be confused after somehow the local date settings had been changed or mdb would be used on other...Leave a comment:
-
How to prevent from different date/time format on different pc
Any idea How to prevent from different date/time format on different pc
I've heard that I should create my own system time function in VBA which will not depend from the local pc system date/time setting
Regards
No activity results to display
Show More
Leave a comment: