Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error when running access file in a network 1

Status
Not open for further replies.

heroddaji

Programmer
Aug 22, 2008
10
NL
Hello, i have built an access database and form, stuffs...

everything done and run fine , absolutely without any error on my laptop.

But when i copy it to a network.
And run the file from a computer belong to that network.
I got error on sql execute.
The problem is that that pc has microsoft access2007 with other language (my is english, that pc is dutch), so i dont know what is that error.

But the visual basic editor point to this code:
CurrentDb.Execute (strSQl)

and this is the strSQL
strSQl = " UPDATE tblBetaal SET restand = " & restand & ", voorSchot = " & voorSchot & ", huisHuur = " & huur & ", verzekering = " & argreement & ", betaald = " & bank & " WHERE week = " & i & " and empNr = " & empNr & ";"

the thing here i think that pc need to get some privilege
to update a table because the file is on a network???

if no then can someone help me , i will try to translate the error into English later...
 
What is the error message? Even post it in Dutch.
Do you have an error handler routine? This will give you more specific error messages.
Try edit the database in Access, if you get an error then it can be network permissions.
 

For the values used in your sql statement, use single quotes around strings, and for number values with decimal or thousand separators, use the STR() function on the numeric values so that a foreign numeric value on a system set with those country settings (concerning the separators) are converted to US Format, (also any date values must be converted to yyyy-mm-dd, mm/dd/yy or yyyymmdd using the FORMAT() function)
 
In addition to SBertholds excellent advice - should any of the fields be boolean - for some countries/localized version you might be getting a localized version of true or false, so you might also consider using Clng(TheBoolean) to coerce it to -1 or 0 ;-)

For further questions related to Access, check out the Access fora - there are at least seven fora dedicated to Access on this site.

Roy-Vidar
 

Boolean: Yes, this is very good to use on foreign set systems.

heroddaji, you might want to also consider using a Command object with parameters to get around some of the problems.
 
Thx all for your help
I solved it

The reason is that the dutch system use the comma"," for decimal number, not dot "."

So if i have a number 2 and a haft(2.5) it will be (2,5)

that why i got the error.

thx all for help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top