|
|
|
Ошибка при открытии хранимой процедуры SQL Server
|
|||
|---|---|---|---|
|
#18+
Суть проблемы: БД SQL Server 2000 и приложение на ACCESS 2000. В БД есть хранимая процедура: Create Procedure dbo.RequestCustomerLitera @RequestID udtMainTablePrimaryKey, @Litera tinyint Output As Select @Litera = tblEveryCustomer.EveryCustomerLitera From tblRequest Inner Join tblEveryCustomer ON tblRequest.EveryCustomerID = tblEveryCustomer.EveryCustomerID Where tblrequest.RequestID = @RequestID В приложении есть функция: Function RequestCustomerLitera (ByVal intRequestID As Integer) As Byte Dim objControl As Control Dim cnn As ADODB.Connection Dim cmd As ADODB.Command Dim prm As ADODB.Parameter Dim bytLitera As Byte Set cnn = New ADODB.Connection Set cmd = New ADODB.Command cnn.Open CurrentProject.Connection Set cmd.ActiveConnection = cnn cmd.CommandText = "RequestCustomerLitera" cmd.CommandType = adCmdStoredProc cmd.Parameters.Refresh cmd.Parameters("@RequestID") = intRequestID cmd.Execute RequestCustomerLitera = cmd.Parameters("@Litera") End Function При запуске приложения на компьютере, на котором непосредственно установлен SQL Server (под управлением Windows NT, которы является контролером домена) все работает без ошибок. Если запускать с сетевого компьютера (Windows 2000 Professional) Access выдает ошибку: Runtime error '-21474672' (80004005)'; Procedure 'RequestCustomerLitera' expecys pframeter RequestID which was not supplied. Кто-нибудь сталкивался с такой проблемой? Что это, ошибка при подключении к SQL Server или тут дело в коде функции? Заранее благодарен. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 18.11.2002, 16:14:04 |
|
||
|
Ошибка при открытии хранимой процедуры SQL Server
|
|||
|---|---|---|---|
|
#18+
После строчки "cmd.Parameters.Refresh" пробегись по коллекции параметров и посмотри имена. Может, эта версия ADO возвращает имя параметра не "@RequestID", а "RequestID". Если подтвердится, то надо самому формировать коллекцию параметров через CreateParam-AppendParam и не делать Refresh. Это всего лишь предположение. Не бейте ногами, если что не так. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 18.11.2002, 17:04:21 |
|
||
|
|

start [/forum/topic.php?fid=46&fpage=3373&tid=1818654]: |
0ms |
get settings: |
8ms |
get forum list: |
14ms |
check forum access: |
2ms |
check topic access: |
2ms |
track hit: |
18ms |
get topic data: |
8ms |
get forum data: |
2ms |
get page messages: |
32ms |
get tp. blocked users: |
1ms |
| others: | 196ms |
| total: | 283ms |

| 0 / 0 |
