|
|
|
Problem with MsSql
|
|||
|---|---|---|---|
|
#18+
Проблемы при получении данных из MsSQL посредством VS Коточе из студии седьмой CDBVariant varValue; CRecordset rs(&SqlDB); !!!!здесь вылетает - rs.Open(CRecordset::snapshot,"EXECUTE AmountGet 'user:psw';"); printf("Point 2\r\n"); if(rs.IsEOF()){ rs.Close(); throw UserException(0,_T("Acount not founded!!!")); return 0; }; rs.GetFieldValue("amount",varValue); printf("Point 3\r\n"); printf("Point 4\r\n"); rs.Close(); return CORBA::Float((varValue).m_fltVal); }catch(CDBException& ex){ printf("Catched DBException descr=%s\r\n", ex.m_strError); throw UserException(1,_T("Acount not founded!!!")); return 0; } catch(CMemoryException& ex){ printf("Catched CMemoryException \r\n" ); throw UserException(2,_T("Acount not founded!!!")); return 0; }; ловится только (...) отловщиком ексепшонов...... ....если из MsSqlMene Studio сделать запрос то все выполняется.... PROCEDURE [dbo].[AmountGet] @AccountId nvarchar(255) -- ret client info rowset as begin set nocount on; select account_amount as amount from testaccounts where (account_name = @AccountId) ; end если вмексто вызова процедурф сделать втупую rs.Open(CRecordset::snapshot,"select account_amount as amount from testaccounts where (account_name = 'user:psw') ;"); то все проходит???где какие разрешения настроить???...странно но под тем же логином с самом сиквеле все проходит.... ...и еще где в сервере посмотреть типо журнал событий(ну там наверное все это отражено) ....и еще почему если запрос вернул 0 строк, то тоже ловинтся экскепшн и причем только (...) ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 04.10.2006, 16:19 |
|
||
|
|

start [/forum/topic.php?fid=57&fpage=332&tid=2030372]: |
0ms |
get settings: |
8ms |
get forum list: |
15ms |
check forum access: |
7ms |
check topic access: |
7ms |
track hit: |
32ms |
get topic data: |
14ms |
get forum data: |
2ms |
get page messages: |
30ms |
get tp. blocked users: |
3ms |
| others: | 202ms |
| total: | 320ms |

| 0 / 0 |
