Hi,
I'm developing a socket program to connect to Informix database
through the ODBC. In here i called my socket program as "tap" . My tap
will listen for data from unix through port 1070. After checking of
the data, tap will then insert the data to the informix database. I
know we can point the tap to one specified port in Informix database
through the services file. My question is how should i know to which
port my tap program send out to the informix database or should i ask
how should i specify one port to connect to the informix and lock that
port from other process to use it?For current moment, my tap will
randomly pick one port to connect to informix database.
My coding for connect to Informix looks like below;
// Initialize ODBC variables
// NOTE : Make sure these variables is intialized before used.
henv = SQL_NULL_HENV;
hdbc = SQL_NULL_HDBC;
hstmt = hOrderStmt = hTradeStmt = SQL_NULL_HSTMT;
SQLAllocEnv(&henv);
SQLAllocConnect(henv, &hdbc);
char szRetMsg[500];
memset(szRetMsg, '\0', sizeof(szRetMsg));
if (SQLSetConnectOption(hdbc,SQL_TXN_ISOLATION,SQL_TX N_READ_UNCOMMITTED)
!= SQL_SUCCESS) {
SQLErrorMessageBox(henv,hdbc,hstmt,"Connect",(LPST R)&szRetMsg);
::MessageBox(NULL,szRetMsg,"Tap32",MB_ICONSTOP|MB_ TASKMODAL);
PostQuitMessage(0);
return FALSE;
}
if (SQLConnect(hdbc, szDSN, SQL_NTS, szUserID, SQL_NTS, szPassword,
SQL_NTS) != SQL_SUCCESS)
{
SQLErrorMessageBox(henv,hdbc,hstmt,"Connect",(LPST R)&szRetMsg);
::MessageBox(NULL,szRetMsg,"Tap32",MB_ICONSTOP|MB_ TASKMODAL);
PostQuitMessage(0);
return FALSE;
}
I really appreciate if someone can help me out. Thank you very much. 3 5988
"Lee" <le******@yahoo.com> wrote in message
news:6b**************************@posting.google.c om... Hi, I'm developing a socket program to connect to Informix database through the ODBC. In here i called my socket program as "tap" . My tap will listen for data from unix through port 1070. After checking of the data, tap will then insert the data to the informix database. I know we can point the tap to one specified port in Informix database through the services file. My question is how should i know to which port my tap program send out to the informix database or should i ask how should i specify one port to connect to the informix and lock that port from other process to use it?For current moment, my tap will randomly pick one port to connect to informix database.
Try as I might, I cannot find a single question or comment about
C++ in your post.
Perhaps you meant to post to an "Informix" and/or "ODBC" newsgroup?
-Mike
"Mike Wahler" <mk******@mkwahler.net> wrote in message news:<K%*****************@newsread1.news.pas.earth link.net>... "Lee" <le******@yahoo.com> wrote in message news:6b**************************@posting.google.c om... Hi, I'm developing a socket program to connect to Informix database through the ODBC. In here i called my socket program as "tap" . My tap will listen for data from unix through port 1070. After checking of the data, tap will then insert the data to the informix database. I know we can point the tap to one specified port in Informix database through the services file. My question is how should i know to which port my tap program send out to the informix database or should i ask how should i specify one port to connect to the informix and lock that port from other process to use it?For current moment, my tap will randomly pick one port to connect to informix database.
Try as I might, I cannot find a single question or comment about C++ in your post.
Perhaps you meant to post to an "Informix" and/or "ODBC" newsgroup?
-Mike
Hi Mike,
Thanks for go through my questions. I developed my tap using VC++. I
used the code below to connect to the informix database. My question
is how can i bind one port no to connect to the database?? thanks for
helping.
if (SQLSetConnectOption(hdbc,SQL_TXN_ISOLATION,SQL_TX N_READ_UNCOMMITTED)
!= SQL_SUCCESS) {
SQLErrorMessageBox(henv,hdbc,hstmt,"Connect",(LPST R)&szRetMsg);
::MessageBox(NULL,szRetMsg,"Tap32",MB_ICONSTOP|MB_ TASKMODAL);
PostQuitMessage(0);
return FALSE;
}
if (SQLConnect(hdbc, szDSN, SQL_NTS, szUserID, SQL_NTS, szPassword,
SQL_NTS) != SQL_SUCCESS)
{
SQLErrorMessageBox(henv,hdbc,hstmt,"Connect",(LPST R)&szRetMsg);
::MessageBox(NULL,szRetMsg,"Tap32",MB_ICONSTOP|MB_ TASKMODAL);
PostQuitMessage(0);
return FALSE;
}
"Lee" <le******@yahoo.com> wrote in message
news:6b**************************@posting.google.c om... "Mike Wahler" <mk******@mkwahler.net> wrote in message
news:<K%*****************@newsread1.news.pas.earth link.net>... "Lee" <le******@yahoo.com> wrote in message news:6b**************************@posting.google.c om... Hi, I'm developing a socket program to connect to Informix database through the ODBC. In here i called my socket program as "tap" . My tap will listen for data from unix through port 1070. After checking of the data, tap will then insert the data to the informix database. I know we can point the tap to one specified port in Informix database through the services file. My question is how should i know to which port my tap program send out to the informix database or should i ask how should i specify one port to connect to the informix and lock that port from other process to use it?For current moment, my tap will randomly pick one port to connect to informix database.
Try as I might, I cannot find a single question or comment about C++ in your post.
Perhaps you meant to post to an "Informix" and/or "ODBC" newsgroup?
-Mike
Hi Mike, Thanks for go through my questions. I developed my tap using VC++. I used the code below to connect to the informix database. My question is how can i bind one port no to connect to the database?? thanks for helping.
if (SQLSetConnectOption(hdbc,SQL_TXN_ISOLATION,SQL_TX N_READ_UNCOMMITTED) != SQL_SUCCESS) { SQLErrorMessageBox(henv,hdbc,hstmt,"Connect",(LPST R)&szRetMsg); ::MessageBox(NULL,szRetMsg,"Tap32",MB_ICONSTOP|MB_ TASKMODAL); PostQuitMessage(0); return FALSE; }
if (SQLConnect(hdbc, szDSN, SQL_NTS, szUserID, SQL_NTS, szPassword, SQL_NTS) != SQL_SUCCESS) { SQLErrorMessageBox(henv,hdbc,hstmt,"Connect",(LPST R)&szRetMsg); ::MessageBox(NULL,szRetMsg,"Tap32",MB_ICONSTOP|MB_ TASKMODAL); PostQuitMessage(0); return FALSE; }
Try as I might, I cannot find a single question or comment about
C++ in your post.
Perhaps you meant to post to an "Informix" and/or "ODBC" newsgroup?
Before posting a message to comp.lang.c++ again, please read this: http://www.slack.net/~shiva/welcome.txt
If you don't understand why I'm replying as I do, please
see www.usenet.org
-Mike This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Greg |
last post by:
Hi All:
Using PHP, how do I connect to an Informix database using an ODBC
connection string like this:
"Dsn='';Driver={INFORMIX 3.30 32...
|
by: Alberto Vera |
last post by:
I use win32com.client to create ADODB.Connection and ADODB.Recordset:
win32com.client.Dispatch('ADODB.Connection')
win32com.client.Dispatch('ADODB.Recordset')
I can connect to an access database...
|
by: Jan Kesten |
last post by:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello,
does anybody know, if there is a module to connect to an Informix
database? I looked around, but I have seen there only modules for...
|
by: Alex Hardin |
last post by:
Hey,
I'm trying to use the connect to database wizard to connect to a MySQL
database on my web server, 66.235.193.45 (I'm actually not sure if that
points specifically to my part of the server, if...
|
by: Bill Nguyen |
last post by:
I have this connection string using ODBC DSN
Dim FactorJaco As String = "dsn=jaco;catalog=factor;uid=user;pwd=passord"
This requires an ODBC DSN (jaco) at every client PC. I need to use DSN-less...
|
by: ocean001 |
last post by:
hi guys,
i am trying to create a mobile interface that can check the balance from my database(ODBC). and i am using visual studio C++. but i am not too familiar with C++, can anyone please help me...
|
by: Gourk |
last post by:
I'm fairly new to the whole MySQL thing, But not new to SQL. So doing most of this was fairly easy, but I have a hosting service with Godaddy.com, and Yes it supports MySQL 5.0 and is installed and...
|
by: AbuArwa |
last post by:
Hi All;
I want to update Mysql database from Informix database but i have a
huge table and if some thing wrong happens to it, our service can be
down, i need to know the feasibility of...
|
by: kurakar |
last post by:
Dear all,
How to connect SQL Database from Server 2005 through dyndns in php,
My dyndns address - xxx-xxx.dyndns.org
Port - 3389(default)
This is the code i am using:
$dsn =...
|
by: Rina0 |
last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM)
The start time is equivalent to 19:00 (7PM) in Central...
|
by: erikbower65 |
last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps:
1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal.
2. Connect to...
|
by: linyimin |
last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
|
by: erikbower65 |
last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA:
1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
|
by: Taofi |
last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same
This are my field names
ID, Budgeted, Actual, Status and Differences
...
|
by: DJRhino1175 |
last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this -
If...
|
by: Rina0 |
last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
|
by: DJRhino |
last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer)
If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _
310030356 Or 310030359 Or 310030362 Or...
| |