Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Unwanted / unnecessary prompt connecting to DB

Reply
Thread Tools

Unwanted / unnecessary prompt connecting to DB

 
 
Richard Clarke
Guest
Posts: n/a
 
      10-18-2004
Hi

My code is as follows:

retcode = SQLConnect (lDBC, szDataSource, SQL_NTS, (unsigned char
*)szUserName, SQL_NTS, (unsigned char *)szPassword, SQL_NTS);

As I am providing the username and password I don't expect to see the
prompt for them, but it is appearing. I am attempting to connect to an
AS/400 database through ODBC using the IBM client access driver.

Is there an SQLSetConnectOption
similar to this one SQLSetConnectOption(m_hDbc, SQL_LOGIN_TIMEOUT, 5);
that will set the prompt to off? Or is it my casting from CString to
unsigned char * that is causing the problem?

Many thanks

--

Rich (change nospam to mlu035 to reply direct)
 
Reply With Quote
 
 
 
 
John Harrison
Guest
Posts: n/a
 
      10-18-2004

"Richard Clarke" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> Hi
>
> My code is as follows:
>
> retcode = SQLConnect (lDBC, szDataSource, SQL_NTS, (unsigned char
> *)szUserName, SQL_NTS, (unsigned char *)szPassword, SQL_NTS);
>
> As I am providing the username and password I don't expect to see the
> prompt for them, but it is appearing. I am attempting to connect to an
> AS/400 database through ODBC using the IBM client access driver.
>
> Is there an SQLSetConnectOption
> similar to this one SQLSetConnectOption(m_hDbc, SQL_LOGIN_TIMEOUT, 5);
> that will set the prompt to off? Or is it my casting from CString to
> unsigned char * that is causing the problem?
>


OK, this is a question about a SQL API, but this group is about the C++
language. You need to take this somewhere where it is topical. A Windows
programming group or a database programming group would seem to be better
places.

How about news:microsoft.public.vc.database?

john


 
Reply With Quote
 
 
 
 
Bob Hairgrove
Guest
Posts: n/a
 
      10-18-2004
On 18 Oct 2004 02:07:12 -0700, http://www.velocityreviews.com/forums/(E-Mail Removed) (Richard
Clarke) wrote:

>Hi
>
>My code is as follows:
>
>retcode = SQLConnect (lDBC, szDataSource, SQL_NTS, (unsigned char
>*)szUserName, SQL_NTS, (unsigned char *)szPassword, SQL_NTS);
>
>As I am providing the username and password I don't expect to see the
>prompt for them, but it is appearing. I am attempting to connect to an
>AS/400 database through ODBC using the IBM client access driver.
>
>Is there an SQLSetConnectOption
>similar to this one SQLSetConnectOption(m_hDbc, SQL_LOGIN_TIMEOUT, 5);
>that will set the prompt to off? Or is it my casting from CString to
>unsigned char * that is causing the problem?
>


I suggest you post this question to:

comp.databases.ibm-db2

Also, try using SQLDriverConnect() with the switch
SQL_DRIVER_COMPLETE_REQUIRED or SQL_DRIVER_NOPROMPT instead of
SQLConnect().

--
Bob Hairgrove
(E-Mail Removed)
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
prompt to save on exit - disable prompt on save button Mel ASP .Net 10 02-13-2009 05:32 AM
How to open a shell prompt from an existing shell prompt gaurav kashyap Python 3 10-31-2008 04:41 AM
How to open a shell prompt from an existing shell prompt gaurav kashyap Python 2 10-30-2008 09:18 AM
Connecting to unwanted network Mike Hyndman Wireless Networking 2 01-16-2007 10:28 PM
Unnecessary Network trafic generated between only two comp out of =?Utf-8?B?bWlja3l0ZWpzaW5naEB5YWhvby5jb20=?= Wireless Networking 1 10-29-2004 09:49 AM



Advertisments