B
b_viehmann_Aachen
Hi,
i want to call a stored procedure remotly on a linked server with ado.net.
What i am doing in ironpython is this:
conn = SqlClient.SqlConnection(connectionString)
conn.Open()
action = SqlClient.SqlCommand("stopro_GetJobStatus", conn)
action.CommandType = CommandType.StoredProcedure
reader = action.ExecuteReader();
while reader.Read():
values = Array.CreateInstance( Object, reader.FieldCount)
reader.GetValues(values)
print(values)
self.results.append(values)
reader.Close()
conn.Close()
But i got an error message:
Traceback (most recent call last):
File "IpsPlusDbWatchDog.py", line 257, in IpsPlusDbWatchDog.py
File "IpsPlusDbWatchDog.py", line 129, in __init__
File "System.Data", line unknown, in ExecuteReader
File "System.Data", line unknown, in ExecuteReader
File "System.Data", line unknown, in RunExecuteReader
File "System.Data", line unknown, in RunExecuteReader
File "System.Data", line unknown, in RunExecuteReaderTds
File "System.Data", line unknown, in FinishExecuteReader
File "System.Data", line unknown, in get_MetaData
File "System.Data", line unknown, in ConsumeMetaData
File "System.Data", line unknown, in Run
File "System.Data", line unknown, in ThrowExceptionAndWarning
File "System.Data", line unknown, in OnError
File "System.Data", line unknown, in OnError
EnvironmentError: Login failed for user 'tasks'.
When I am trying this code with a query instead of a stored procedure
everything works fine.
So is it rigth that i have to change the configuration of the SQL-Server?
How?
BTW: I am using Win2003 Server and SQL-Server 2005.
Thanks much for your help.....
i want to call a stored procedure remotly on a linked server with ado.net.
What i am doing in ironpython is this:
conn = SqlClient.SqlConnection(connectionString)
conn.Open()
action = SqlClient.SqlCommand("stopro_GetJobStatus", conn)
action.CommandType = CommandType.StoredProcedure
reader = action.ExecuteReader();
while reader.Read():
values = Array.CreateInstance( Object, reader.FieldCount)
reader.GetValues(values)
print(values)
self.results.append(values)
reader.Close()
conn.Close()
But i got an error message:
Traceback (most recent call last):
File "IpsPlusDbWatchDog.py", line 257, in IpsPlusDbWatchDog.py
File "IpsPlusDbWatchDog.py", line 129, in __init__
File "System.Data", line unknown, in ExecuteReader
File "System.Data", line unknown, in ExecuteReader
File "System.Data", line unknown, in RunExecuteReader
File "System.Data", line unknown, in RunExecuteReader
File "System.Data", line unknown, in RunExecuteReaderTds
File "System.Data", line unknown, in FinishExecuteReader
File "System.Data", line unknown, in get_MetaData
File "System.Data", line unknown, in ConsumeMetaData
File "System.Data", line unknown, in Run
File "System.Data", line unknown, in ThrowExceptionAndWarning
File "System.Data", line unknown, in OnError
File "System.Data", line unknown, in OnError
EnvironmentError: Login failed for user 'tasks'.
When I am trying this code with a query instead of a stored procedure
everything works fine.
So is it rigth that i have to change the configuration of the SQL-Server?
How?
BTW: I am using Win2003 Server and SQL-Server 2005.
Thanks much for your help.....