|
HI,
I have a procedure inside a package. I am trying to execute it using the call syntax. But while trying to prepare the statement i get an Syntax Error or Access Violation error with a SQL state of 37000. I try executing other procedures from the same package it executes properly. Dunno why this is giving a problem. Any suggestions.
Regards,
Mihir Shroff
|
|
|
|
|
provide the code snippet
... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
|
|
|
|
|
HSTMT hStatement = NULL;
m_strSQLState = "";
m_strErrorString ="";
m_lNativeError = 0;
if( !m_pConnection )
{
if (CDatabaseManager::m_nLogLevel > 0)
DumpInfo(CDatabaseManager::m_pLog,"No Database connection exists");
return FALSE;
}
if(strSQL == "")
{
if (CDatabaseManager::m_nLogLevel > 0)
DumpInfo(CDatabaseManager::m_pLog,"Not a valid SQL statment");
return FALSE;
}
if (bDisplaySQL)
{
if (CDatabaseManager::m_nLogLevel > 0)
DumpInfo(CDatabaseManager::m_pLog,"[ActionQuery] SQL Statement is:" + strSQL);
}
RETCODE rCode;
HDBC hDbc = m_pConnection->m_hODBC;
HENV hEnv = m_pConnection->m_hEnv;
//Allocate the statement
rCode = ::SQLAllocStmt(hDbc,&hStatement);
if(rCode != SQL_SUCCESS)
{
if (CDatabaseManager::m_nLogLevel > 0)
DumpInfo(CDatabaseManager::m_pLog,"SQLAllocStmt Error");
CheckSQLError(hStatement);
return FALSE;
}
rCode = ::SQLSetStmtOption(hStatement,SQL_CONCURRENCY,SQL_CONCUR_VALUES);
if( (rCode != SQL_SUCCESS) && (rCode !=SQL_SUCCESS_WITH_INFO) )
{
if (CDatabaseManager::m_nLogLevel > 0)
DumpInfo(CDatabaseManager::m_pLog,"SQLSetStmtOption Error:");
if (CDatabaseManager::m_nLogLevel > 0)
DumpInfo(CDatabaseManager::m_pLog,"[Warning]Lock during action query may not be available");
CheckSQLError(m_hStatement);
}
//Prepare the allocated statement
rCode = ::SQLPrepare(hStatement,(unsigned char*)LPCTSTR(strSQL),strSQL.GetLength() );
if(rCode != SQL_SUCCESS)
{
if (CDatabaseManager::m_nLogLevel > 0)
DumpInfo(CDatabaseManager::m_pLog,"SQLPrepare Error:");
CheckSQLError(hStatement);
::SQLFreeStmt(hStatement,SQL_DROP);
return FALSE;
}
//Execute the prepared SQL statement
rCode = ::SQLExecute(hStatement);
if((rCode != SQL_SUCCESS) && (rCode != SQL_SUCCESS_WITH_INFO))
{
if (CDatabaseManager::m_nLogLevel > 0)
DumpInfo(CDatabaseManager::m_pLog,"SQLExecute Error");
CheckSQLError(hStatement);
::SQLFreeStmt(hStatement,SQL_DROP);
return FALSE;
}
::SQLFreeStmt(hStatement,SQL_DROP);
return TRUE;
and strSQL = "{call MTMS_TCMD.FMForLoad(82,'ETR Data not available!')}";
Regards,
Mihir Shroff
|
|
|
|
|
Hello guys,
I'm writing a simple demo application that have to display two DB tables data refreshed every X seconds.
To do so, I'm using two MS DataGrid Controls in a Dialog Box... it works perfectly, but I'd like to add different row colors depending on a column value (ie: the table PROCESS displays different process statuses and for terminated process I would display a green line, for failed processes a red one and so on...).
Someone has alredy done so, or has someone a good tip for me?
Thanx,
Fabio
|
|
|
|
|
hiho
i read a book about linux networking and it describes some techniques for a server
but my question is more about software architecture than linux programming
so i post it here
1. multiplexing (select())
2. multiprocess (fork())
3. multithreaded (pthread's)
i understand the architecture of a process pool in which every process holds a thread pool where every thread calls accept on a socket to get the connection
the kernel then makes the decision which thread gets the connection
and that's why i don't understand multiplexing
because i think multiplexing does exactly the same
you use select to wait for a connection (or a descriptor to change its state) and then make accept
but if this can the kernel do for you
what is a multiprocessed, multithreaded multiplexing server good for?
or what exactly is a multiplexing server compared with a multiprocesses/multithreaded server?
thx@ll
|
|
|
|
|
Multiplexing is easy. It is a technique to handle multiple sockets with only one thread.
You use a loop with a call to select to detect action on every single socket to be able to answer requests for example!
This needs less resources than multi-threading or even forking.
Don't try it, just do it!
|
|
|
|
|
but i don't need multiple sockets!
i just need to listen on one socket!
does it make sense if i only need to listen on one socket?
|
|
|
|
|
How can i make my edit box look like below?
------------------------
|xxxx-xxxx-xx |
------------------------
The user is allowed to edit the x only
/\|-||\/|/\|)
|
|
|
|
|
Halawlaws wrote:
How can i make my edit box look like below?
by using several editboxes side by side ?
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
IP contorl'd be of any use??? xxx.xxx.xxx.xxx??
V
|
|
|
|
|
don't worry i find out how.
Click here if u are interested.
/\|-||\/|/\|)
|
|
|
|
|
You have to validate every modification in the control by processing all the EN_CHANGE messages on the CEdit.
Marc Soleda.
... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
|
|
|
|
|
hi,
my name is aditya. i am new to vc++. i am trying to create a ftp application. what i want to know is when we connect to a ftp site. there are many directories on the site(apart from the files). so how can i see the contents of the directories or download the whole directory present there.
aditya
|
|
|
|
|
From the RFC[^]:
LIST (LIST)
This command causes a list to be sent from the server to the
passive DTP. If the pathname specifies a directory or other
group of files, the server should transfer a list of files
in the specified directory. If the pathname specifies a
file then the server should send current information on the
file. A null argument implies the user's current working or
default directory. RFCs are good. Use them!
--
An eye for an eye will only make the world blind.
|
|
|
|
|
I used vc++6.0 to buid the windows DiretShow simple code playcap and got the link error 2001.
How to settle this problem?
Thanks!
momer
|
|
|
|
|
what does the linker say ??????
it doesn't find _main ...
what does that mean ???
you must have a main() function in your code, which is the entry point of your program...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Hi!Dear toxcct,
It says:LIBCD.lib(crt0.obj):error LNK2001:unresolved external sybol _main.
Yes,I know I must have a WinMain() function in my C++ code.
Now I have killed this problem by setting the project option subsystem:windows, but not subsystem:console,couse I used the MFC in my code.
Thank you very much!
Best Regards!
|
|
|
|
|
How to Spilit the Status Bar in a Horizontal Fashion......?
or to change the position of the text displyed in the status bar
ditty grail
|
|
|
|
|
What create static\dynamic library and use them in vc++?
Would you list a example?
thanks!
|
|
|
|
|
sorry, but to get an answer that is what you're looking for, you should first formulate your question correctly (personnaly, i don't understand at all)...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
I don't understand what you mean
... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
|
|
|
|
|
I now doing a project that I don't know how to start. I need to know how the
TCP work and write a program to send data from a PC to another PC using visual c++. After knowing how the TCP work, I need to write a program to send and receive message from Host PC to PLC follow the MODBUS format. Can help me....
|
|
|
|
|
|
I just go through the CAsyncSocket and I start program a little but got some error that I don't understand,can help me.....
Below is my code:
#include "iostream.h"
#include "afxsock.h"
BOOL Create(
UINT nSocketPort = 0,
int nSocketType = SOCK_STREAM,
long lEvent = FD_READ | FD_WRITE | FD_OOB | FD_ACCEPT | FD_CONNECT | FD_CLOSE,
LPCTSTR lpszSocketAddress = NULL
);
when I compile, it show the error below:
libcd.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/TEST.exe : fatal error LNK1120: 1 unresolved externals
|
|
|
|
|
looking at the linker error, your program don't have any main() function...
where did you put the code so ?
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|