473,386 Members | 1,779 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,386 software developers and data experts.

Use ADO shape command with DB2?

Hello,
I have several reports that were written with ADO shape command (in
C++) to access Microsoft Access database. Now we have migrated all the
data from Access to DB2 UDB (version 8.1), and the shape command does
not work any more. I have changed the provider and connection string
from:

pConn->Provider = "MSDataShape";
SAFE_CALL( pConn->Open( "DBQ=myAccessDB.mdb; DefaultDir=.;
Driver={Microsoft Access Driver (*.mdb)};", "sa", "", 0 ) );

to:

pConn->Provider = "IBMDADB2";
SAFE_CALL( pConn->Open( "dsn=myDB", "myUserName", "myPwd",
adModeUnknown ) );

The following is a snippet of the shape command I have:

bstrQuery = "SHAPE {SELECT PicIndex, PicID, InspectionNumber FROM
MaskIdInfo WHERE PicIndex =";
bstrQuery += bstrPicIndex;
bstrQuery += "} APPEND ";
bstrQuery += " ({SELECT PicIndex, Date, Time FROM
PicLoadOccasion ";
bstrQuery += "ORDER BY LoadOccasionIndex DESC";
bstrQuery += "} RELATE PicIndex TO PicIndex) AS rsLoadOccasion, ";
bstrQuery += " ({SELECT PicIndex, DefectIndex FROM PicDefect ";
bstrQuery += "ORDER BY DefectIndex ";
bstrQuery += _bstr_t(sortOrder);
bstrQuery += "} RELATE PicIndex TO PicIndex) AS rsPicDefect, ";
bstrQuery += " ({SELECT PicIndex, Date, Time FROM PicRepairHist
";
bstrQuery += "ORDER BY PicRepairHistId DESC";
bstrQuery += "} RELATE PicIndex TO PicIndex) AS rsPicRepairHist";

I tried to change the provider to "MSDataShape" (as it was before the
migration to DB2), it does not work of course. How should I specify
the provider and the connection string so the shape command works with
DB2? Or does shape command work with DB2 at all?
Thanks for any help.
Nov 12 '05 #1
0 1809

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

Similar topics

0
by: Anchorman | last post by:
I'm using the following SHAPE command: SHAPE {SELECT * FROM Chapters WHERE SchoolID=320} APPEND ({SELECT * FROM ChapterLink} RELATE ID TO ChapterID) AS Advisors ({SELECT FirstName, LastName...
3
by: PM | last post by:
Hi, Im a student currently designing a game for a project. As part of my game, I want to be able to drag a shape over a series of panels. The shape needs to be able to be dropped on any of the...
0
by: nets-rac | last post by:
Hi, I use c# to automate powerpoint. I created a new shape with PowerPoint.Shape shape = slide.Shapes.AddTextbox(MsoTextOrientation.msoTextOrientationHorizontal, left, top, width, height);...
0
by: saravanansvks | last post by:
Dear Friends, I have prepared a programme in Visual Basic for SHAPE OPERATOR.But my coding are changing the shape only.It does not changes the fill style of the shape tool .And it is not giving ant...
1
by: perse981 | last post by:
Hi I need to know how, if even possible, to enable the user of my program to control the Size and Posisiton of the circle I have Drawn on the form by using the Enter Key (to increase size), Shift...
5
by: sunil borwankar | last post by:
I am trying hard to make Custom Command Buttons of Irregular Shape and of Different colours in Active X Interface Wizard but am not successful. Irregular Shape Buttons i.e.; Triangular, Arrow Shape...
5
by: Peter Webb | last post by:
I have created two sets of circles using addshape, innercircle(i) and outercircle(i), and I want to group them in pairs so innercircle(1) and outercircle(1) are grouped, etc. I am supposed to be...
4
by: Linda Liu[MSFT] | last post by:
Hi Moondaddy, I downloaded your sample project and run it and did see the problem on my side. There're three problems in the source code of your project. 1. You should move the following...
12
by: ab12 | last post by:
I'm trying to write a program in C that gets a shape outlined with asterisks from the user, and returns that shape filled with asterisks. It will also get the coordinates of a point inside the shape...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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.