473,396 Members | 1,917 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Unwanted / unnecessary prompt connecting to DB

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)
Jul 22 '05 #1
2 1255

"Richard Clarke" <no****@mlu035.freeserve.co.uk> wrote in message
news:f5**************************@posting.google.c 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
Jul 22 '05 #2
On 18 Oct 2004 02:07:12 -0700, no****@mlu035.freeserve.co.uk (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
No**********@Home.com
Jul 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Racer X | last post by:
I have a simple form connecting to an Access database where users log in, fill out the form, and submit. Everything works fine. However, sometimes it takes a user 20 minutes or more to fill out...
0
by: JB | last post by:
Hey ppl, I'm experiancing a very weird problem with my current Win32(win2k/XP) application. I'm using: * Delphi 7 * ADO * mySQL ODBC 3.51 drivers
23
by: chris Jangelov | last post by:
It seems that opening a link in a new window isn't considered to be good practise in xhtml 1.1. The w3c validation service does not accept it and I have to downgrade those pages to...
7
by: Frank.Sebesta | last post by:
I have a wedge mag stripe reader that I swipe when ask to input information in a query. How do I filter the unwanted characters. Apparently there are two mag stripes that are read every time I...
4
by: David Beck | last post by:
I donwnload some files for processing every day that have unwanted characters in them. In VB6 I use the InputB to read in the text and the StrConv. vLinesFromFile =...
3
by: Billy Cormic | last post by:
Hello, I would like to write a windows application that can get the IP address of the computer the appliation is installed on. Then the program should ftp a file to another computer. I have no...
16
by: lovecreatesbeauty | last post by:
/* When should we worry about the unwanted chars in input stream? Can we predicate this kind of behavior and prevent it before debugging and testing? What's the guideline for dealing with it? ...
10
by: vel | last post by:
Hi, My program is access the remote system's command prompt through C# program. I can do it. But problem is alignment of that output. can any one give idea to align that output ?. here is...
5
by: bunny02 | last post by:
Hi all, I m new to perl, and writing a script , in which i need to connect to the command prompt from my perl script and pass some commands like " mkdir testdir". Is there any module available...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.