Problem with acc 200 and SQl Server 2005

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a 2000 ADP. I'm working on a german system. When I try to execute a
stored proc with three params where on will be a float parameter Access sends
a statement like

exec mySP 'param1','param2',5,02

It must be:
exec mySP 'param1','param2',5.02

It seems that Access uses the german decimal point = ','.

When I use a SQL 2000 server every thing goes right.

How can I tell Accees to use the right english format?

Thanks

Joerg
 
On some occasions, Access use the regional settings of the machine; so maybe
you could take a look there. Another possibility would be to take a look at
the default language defined for the login (or user account) on SQL-Server.
A suspect that the account used with SQL-Server 2005 doesn't have the same
default language as the one used with the SQL-Server 2000 instance.

Finally, you don't say how you are trying to execute this SP from Access.
Maybe there is another way to call a SP without the problem with the decimal
separator.
 
Hi Panini,

I think you start the proc with a concatenated string.
Use parameters instead of such a concatenated string.

e.g.

Dim cmd As ADODB.Command
Dim prm As ADODB.Parameter

Set cmd = New ADODB.Command
With cmd
Set .ActiveConnection = CurrentProject.Connection
.CommandText = "dbo.YourProc"
.CommandType = adCmdStoredProc

Set prm = .CreateParameter("Parm1", adVarchar, adParamInput, Len(Var1) +
1, Var1)
.Parameters.Append prm

...

Set prm = .CreateParameter("Parm3", adDouble, adParamInput,,Var3)
.Parameters.Append prm

.Execute
End With

If you use parameters instead of strings the Parameter-Object will take care
of the correct format.

HTH ;-)

--
Gruß, Uwe Ricken
MCP for SQL Server 2000 Database Implementation

db-Berater GmbH i. G. 64390 Erzhausen
http://www.db-berater.de
http://www.memberadmin.de
http://www.conferenceadmin.de
____________________________________________________
dbdev: http://www.dbdev.org
APP: http://www.AccessProfiPool.de
FAQ: http://www.donkarl.com/AccessFAQ.htm
 
Hi,

the default language for both server is German and I am using parameters to
start the proc like you mentioned in your post.

Joerg Werner
 
Back
Top