How to solve this problem? #2

I write two program,one is that create ODBC-link to access and register
two control:MS ADO Data and MS DataGrid automaticly,another is to display
database,look:
BOOL CAutoDlg::OnInitDialog()
{
SQLConfigDataSource(NULL,ODBC_ADD_DSN,"Microsoft Access Driver (*.mdb)\0",
\
  "DSN=LeadLink\0 DESCRIPTION=For Lead ODBC Link\0 DBQ=RS485.mdb\0
FIL=Microsoft   \
      Access\0 default=");
CString OcxFileName;
HINSTANCE hLib;
FARPROC lpDllEntryPoint;
OcxFileName="MSADODC.OCX";
hLib = LoadLibrary(OcxFileName);
if (hLib==NULL)
{
AfxMessageBox("Error");
}
lpDllEntryPoint = GetProcAddress(hLib,"DllRegisterServer");
lpDllEntryPoint();

OcxFileName="MSDATGRD.OCX";
hLib = LoadLibrary(OcxFileName);
if (hLib==NULL)
{
AfxMessageBox("Error");
}
lpDllEntryPoint = GetProcAddress(hLib,"DllRegisterServer");
lpDllEntryPoint();
OnOK();
}
in another program,I use two control:MS ADO Data and MS DataGrid,and
set the control MS ADO Data link to access through ODBC and select records,
set the control MS DataGrid's data resource link to the control MS ADO Data.
I put the five files in the same fold:two the control files,a access file
and
the two application files.In a PC that its OS is win98 without access,these
program run normally,but in a PC that its OS is win98 without office,when
the
program is running,it display "Microsoft DataGrid Control:Cannot initialize
data
bindings",I want how to solve this program?thanks.


0
fbjlt (155)
9/28/2004 12:46:52 AM
vc.mfc 33608 articles. 0 followers. Follow

0 Replies
970 Views

Similar Articles

[PageSpeed] 6

Reply:

Similar Artilces:

Intercept ShutDown Event in C# ? Problem with error code 0xC000014
Hi all, I am trying to write application which will intercept ShutDown event and then cancel that even do some backup work and then fire again shut down event. The problem I am facing is that after capturing shutdown event following line does not help me to cancel it completlly: System.Diagnostics.Process.Start(@"C:\WINNT\system32\shutdown.exe", "-a"); So ShutDown seems to be canceld but my application report error code 0xC0000142 in User32.dll, and can not proceed with backup operation. Is there any way to cancel shutdown event and that application have a...

POS 2.0
Hello again, Is there a way to assign a sales rep to a sale on POS 2.0? I need to calculate commissions - the "Daily Sales by Employee" report uses the cashier information. I noticed that the "TransactionEntry" table contains a SalesRepID column, but I don't see where to set it in the POS screen. Being able to assign a sales rep to each line item is exactly what I need! Thank you! hi Johann, Currently I am waiting for my POS2.0 and using 1.3 version but for your information both the version has transaction level things similar. There is way to assign the sale...

Problem after Changing the Domain Admin password
After changing the password for the domain admin users cannot log into outlook but can open WEBMAIL. If i change the admin password back and restart the the Exhange services everyone can once again log into their outlook. It is Exchange 2000 on a windows 2000 server. The exchange services are set to use the local system account. Any suggestions. ...

Outlook Office assittant problem
hi all When i start and stop the outlook 2000, i am getting the following alert message "There are no Office Assistant character files present on the system. Please run setup in maintenance mode and install at least one character" but by clicking "Ok" , the outlook continues to work. what can be done for avoiding this alet? Thanks and redgs neela The program is asking that the original installation media be placed back in the machine, go to the add/remove applet in the control panel, highlight Office/Outlook 2000, and select Add/Remove. From there it wants y...

Parameter Query Problem 12-21-07
Hi, I'm creating a Paramater Query based on the date of a payment and receipt number for a record which includes 1st payment, second payment, and 3rd payment and 1st receipt number, 2nd receipt number, and 3rd receipt number fields. How do I retrieve only the field results which match the parameter criteria without pulling up other field values of that record which may not fit the search criteria? Thank you for any suggestions. I suggest that you change you table structure to something like this --- Payments --- PayID - autonumber Invoice - (could be SalesID - relates to sale &...

imap problems through front end
I am having problems with imap through the front end server. the front end server is in an dmz and back end in the private network. so a user from the public net tried imap through front end using outlook express and gets an error The requested name is valid, but no data of the requested type was found. any ideas? even ms support does not even know I dont want to have to relocate my front end server help please Hi Tony, Is the IMAP service running on the backend also? This is a requirement. If IMAP, POP, etc is running on the front end it also needs to be running on the back ...

Inconsistent rule problem
I have a rule set up that automatically forwards specific emails as an attachment. The problem is that sometimes an email will come in the rule will send it off and then the email is marked as read, at other times it's marked as unread. Is there anyway to make sure that the email will read unread until I actually read it? -- ejames See my reply to your post in microsoft.public.outlook.general. -- Jocelyn Fiorello MVP - Outlook *** Messages sent to my e-mail address will NOT be answered -- please reply only to the newsgroup to preserve the message thread. *** "ejames"...

2 Personal folders, using Contact Manager
Installation is Outlook 2003, installed from the Small Business Edition of Office 2003, also having Contact Manager installed. Seem to have, by default, 2 lots of "personal folders" which mirror each other in every way. A clue as to why, and what to do to remove the superfluous folder would be appreciated. Have tried removing the PST file, and starting Outlook so it created a new one, but the Personal Folder duplicate is still there. Tx2 <tx2newscollection@hotmail.com> wrote: > Seem to have, by default, 2 lots of "personal folders" which mirror > each ...

Money Essential #2
Hi, I would like to know if the Money essential is compatible with the files that were created using Money 2004 -- Thank You in Advance Merci a l'avance Martin Martin Racette | 2009-05-30 | 3:09:46 PM wrote: >I would like to know if the Money essential is compatible with the >files that were created using Money 2004 Short answer: No Longer answer: Money Essentials is not compatible with anything. If you already bought ME, return it and get one of the Money Plus versions. -- Steve Bell New Life Home Improvement Arlington, TX USA Fortunately I did not bought it, but unfort...

Problem loading outlook
Hi Guys Everytime I start Outlook 2003 I get the following error: A runtime error has occurred. Do you wish to debug? Line:297 Error: Class not registerd. If I click yes I am asked which Just-in-time debugger I want to use. I select Microsoft Script Editor 6.0 and get the following message: An excpetion of type 'Class not registered' was not handled and then the following is highlighted: document.all.dateScript.innerHTML = window.external.GetDate(); Any help please -- Thanks TJ Try a new mail profile. --� Milly Staples [MVP - Outlook] Post all replies to the group t...

gmail.com sending problem
hi... i am using a exchange server 2000 all mail send/receive is working properly but gmail.com domain sending problem when any user send mail to gmail domain users of gmail receives quiet late about after 10 hours. Any way to check why gmail domain problem quite late in queue. Thanks in advance If you look at the headers in GMail of a message that was sent from your domain, you should be able to tell from the time stamps where the delay is....once you know where, you can then focus on why... "Hyder Abbas" <Hyder Abbas@discussions.microsoft.com> wrote in message ne...

Thrift Savings Plan #2
Does anyone know an accurate way of tracking the military retirement plan, TSP? I have just added an account called TSP and modeled it like a 401(k). Then for each of the funds you have, just add a new investment. You won't have a stock symbol or anything. Some days, I manually update the fund prices, and others I don't. It will calculate your returns whenever you make new transactions. I basically just make those investment transactions whenever I get my quarterly statement. I don't know of a better way of tracking the TSP. "Anthony" wrote: > Does anyone ...

Junk E-mail filter #2
The Junk E-mail filter I have learned does not work unless Outlook is running in cached mode. I am not sure I understand why this is so. The server does not provide any filtering, so unless we can put up with the delayed access time in cached mode, we can't have any filtering? Is that right? Or is there some other server-side filtering I'm not aware of? Thanks. Tim Hello Tim, Thank you for posting here. You are right that the Junk Email filter feature only supports in Cached Exchange Mode. However, on the server side, you may use the following suggestion to prevent spam: 1. ...

Problems downloading transactions #2
For some reason I can't download transactions for my Wells Fargo accounts through MS Money 2007 anymore. It seems that there were two options in the past, 1 was to download them through MS Money for free or 2, pay for Online banking with Wells Fargo which gives you bill pay. Wells Fargo said they don't support option 1 and it was done through MS Money. Is this option no longer available through Money? I recently had this problem pop up, too. Within the past week, whenever I try to download my information through MS Money (as I have for a few years) it has not permitted me to do so...

Using an IF statement, based on 2 COUNTIF results (I think)
I'm using Excel 2003 so I hope I'm not limited here. We are performing a space usage survey and I need to compile the data results. Each location has 70 entries over the course of 10 days. I have a column for "group work" where the value is either 1 or 0. I have another column for # of people observed in a particular office. What I'm trying to do is the following: Get a count of instances where "# of people" = 1 and "group work" = 0 I'm doing a lot of countif statements, but I don't see how to do a countif with an and operato...

Summing problem
Hi I have have few columns which have several rows. Each column has been added up using the Sigma tool (S). When I try to add up ( = A+B+C...) those sums I end up with zero value no matter what I do? Any ideas? Thanks Kalevi Hi Kalevi, > I have have few columns which have several rows. Each column has been added > up using the Sigma tool (S). When I try to add up ( = A+B+C...) those sums I > end up with zero value no matter what I do? > Any ideas? > You mean =A10+B10+C10 ? (or =SUM(A10:C10)) Regards, Jan Karel Pieterse Excel MVP www.jkp-ads.com Just a guess .. Perha...

Outlook & OWA Language problem
We have a client running Outlook 2003 and IE 6 for OWA. Both clients have the inbox (and several other folders) in spanish. It should be in english. Have checked the local machines for different languages. (yes this happens on every machine she logs into and at home using OWA). We have already run: outlook.exe /ResetFolders outlook.exe /ResetFolderNames These switches did nothing. We also did a repair on the Office 2003 install, uninstalled office and reinstalled it...Still the same. The exchange servers do have anti-virus software running but it's not effecting the other 48,000+ users. ...

Sorting Problem 03-19-07
I deleted a previous question on this, but I now can't view the thread. Please accept my appology. I need to start again. Field: DBxInst: ([DBNum]*1000)+[Inst Num] Field: TheSortOrder: IIf([Forms]![boxSeatsForITI]![MySortOrder]=1,[BankName],[DBxInst]) The Sorting and Grouping window contains TheSortOrder. When MySortOrder = 1, the report is sorted correctly by [BankName]. When MysortOrder = 2, the report is not sorted by [BankName], nor is it sorted by [DBxInst], because the value of DBxInst is WRONG. But if I put [DBxInst] in the Sorting and Grouping window instead of MySortOrde...

Strange CListCtrl Sorting problem
Hi All, Here is the situation. I have a list control that get's populated after the user selects an item from a combo box. Each time the user selects a new item from the combobox I remove all the items and add new ones. Now depending on the combo box item selected, the list needs to be sorted or not. So I have a m_Sort flag that get's set everytime the ComboBox selection is changed, and after I populate the CListCtrl I call SortItems if the m_Sort flag is set to true. If the first time I populate the CListCtrl and sort it, then everytime I clear it an add items they are all sorte...

WSAEPROVIDERFAILEDINIT problem from service
I run from service process with user rights (when user is logged) and in this process I create socket (CAsyncSocket::Create(port);). And I get WSAEPROVIDERFAILEDINIT error. When I run this process manually everything is ok. What is wrong? There are issues of server privileges involved. One thing you might try is to use other than the LocalService account to run the service. joe On Tue, 11 Oct 2005 17:37:45 +0200, ragi <ragi@agora.pl> wrote: >I run from service process with user rights (when user is logged) and in >this process I create socket (CAsyncSocket::Create(port)...

Problems with installing Outlook client user terminal server
Dear all, We are having problems installing the Outlook client on our Terminal service environment. The web client works great but when Outlook is started it crashes straight away and we get error messages in the server event log "There was a problem connecting to the authenticating server". Do you know the "log in" diference between CRM using Outlook and CRM using web client ? Is it possible that the system is trying to log into other services than the web client does typically ? ...

Problem re-loading Office 2003
I have a fully certified copy of Office 2003 which was working fine and no problems at all - but after the hard-drive failed on my Vaio pc - I had to use the emergency disc to recover the XP system after a new hard-drive was installed. All my old programmes loaded like a dream - except Office 2003 that started the set up and then an error message came up - Waiting for cabinets to be cached - then missing file L2561412 and set up failed. I trawled through the web to try and find a solution and someone suggested that this was because 2003 was not locating the CD drive to locate...

Outlook & Outlook Express
I have both loaded on my computer (Express was my original e-mail program). I successfully loaded Outlook and copied my contact list. I then set Outlook as the default. Nevertheless, I only get mail on O-Express, even though all my settings on Outlook, Outlook-Express list Outlook as the default. Mail settings on my control panel verify this. What's wrong??? Firstly with OE closed does OL send/receive OK ie send yourself a msg If OK, either delete mail accounts in OE, or set it to not check for mail. If you use OE (mail) and OL whichever is open will receive mail, assuming the ...

Problem with ExportAsFixedFormat with selected sheets
I have the routine below in a number of workbooks. Typically it works without a problem. I have a sheet with sheet names that I select and it exports the sheets to a PDF. For some reason sometimes it only produces a PDF with the first sheet in it instead of all sheetnames that were selected. I have made sure the sheetname array has more than one value and have also made sure (by exiting before the export) that it is selecting the correct sheets in a group. Both of those work fine. I have also made sure that there was not a problem with the SortableDateString fuction. If I manually select th...

transfer data range from criteria in 2 combo boxes
i have 2 combo boxes "com1" and "com2" i want the value in "com1" to help me decide which columns to target and i would like "com2" to decide which rows to target from another worksheet "sheet2" example: if the value of "com1" was "red" and the value of "com2" was "5/1/10" then i can return C5-C35 from "sheet2" into "a1-a31" in the original sheet example: if the value of "com1" was "blue" and the value of "com2" was "5/2/10" then...