473,698 Members | 2,403 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 = "MSDataShap e";
SAFE_CALL( pConn->Open( "DBQ=myAccessDB .mdb; DefaultDir=.;
Driver={Microso ft 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, InspectionNumbe r FROM
MaskIdInfo WHERE PicIndex =";
bstrQuery += bstrPicIndex;
bstrQuery += "} APPEND ";
bstrQuery += " ({SELECT PicIndex, Date, Time FROM
PicLoadOccasion ";
bstrQuery += "ORDER BY LoadOccasionInd ex DESC";
bstrQuery += "} RELATE PicIndex TO PicIndex) AS rsLoadOccasion, ";
bstrQuery += " ({SELECT PicIndex, DefectIndex FROM PicDefect ";
bstrQuery += "ORDER BY DefectIndex ";
bstrQuery += _bstr_t(sortOrd er);
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 "MSDataShap e" (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 1915

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

Similar topics

0
1673
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 FROM LocalAdvisors } RELATE UserName TO UserName) AS AdvName I get an error, "Column (UserName) does not exist in the appropriate rowset", which is correct, the UserName column actually exists in the
3
2208
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 panels. If the shape is dropped outside any of the panels, I want it to be returned to its original position.
0
1967
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); shape.TextFrame.TextRange.Text = text; Now I want the text to be right-aligned but I can't find a solution!
0
1924
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 error msg. Anyhow anybody knows if there is any error in its please write to me.I am needed this programme for my assignment. MY CODING : Private Sub Command1_Click() Dim i% If (Option1.Value = True) Then Shape1.Shape = 0 Shape1.Visible =...
1
2024
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 Key (to decrease size), and Arrow Keys (to alter posistion of circle on screen). My program consists of a single form with six command buttons and a circle that I drew with the shape control. For each of the command buttons I have written a click...
5
11541
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 and Hexagonal are made and are responding in click event but I am not able to provide colors to them. I used Window API programming also but buttons are not getting colored. Kindly help. I am calling Window API "gdi 32" in Modules and Putting Shapes,...
5
8845
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 able to use the shapes.range(array()).group command to do this. This works if I just stick numbers in at random, but I actually want to put in the index numbers for innercircle(i) and outercircle(i). I have tried everything I can think of. How...
4
3896
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 lines of code from the GetGeometry method within the CustomPolyLine class: _points.Add(new Point(10, 10));
12
4335
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 from which to start filling. I need to use recursion here. for example, to be clear: input: (ignore the line, think of that as blank space) ***** *___* ***** coordinates are (2,1) /*its an array so numbering will start from 0*/ output...
0
8680
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8609
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9030
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8899
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8871
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6528
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4371
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4622
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.