ADO Exception

// BeginVersionCpp.cpp
// compile with: /EHsc
#import "msado15.dll" no_namespace rename("EOF", "EndOfFile")
#include <ole2.h>
#include <stdio.h>
#include <conio.h>
// Function declarations
inline void TESTHR(HRESULT x) { if FAILED(x) _com_issue_error(x); };
void VersionX();
void PrintProviderError(_ConnectionPtr pConnection);
void PrintComError(_com_error &e);
int main() {
    if (FAILED(::CoInitialize(NULL)))
        return -1;
    VersionX();
    ::CoUninitialize();
}
void VersionX() {
    HRESULT hr = S_OK;
   _bstr_t strCnn("Provider='sqloledb'; Data Source='My_Data_Source'; Initial Catalog='pubs'; Integrated Security='SSPI';");
    // Define ADO object pointers.  Initialize pointers on define.
    // These are in the ADODB::  namespace.
    _ConnectionPtr pConnection = NULL;
    try {
        // Open connection.
        TESTHR(pConnection.CreateInstance(__uuidof(Connection)));
        pConnection->Open (strCnn, "", "", adConnectUnspecified);
        printf("ADO Version   : %s\n\n",(LPCSTR) pConnection->Version);
        printf("DBMS Name   : %s\n\n",(LPCSTR) (_bstr_t)
            pConnection->Properties->GetItem("DBMS Name")->Value);
        printf("DBMS Version   : %s\n\n",(LPCSTR) (_bstr_t)
            pConnection->Properties->GetItem("DBMS Version")->Value);
        printf("OLE DB Version   : %s\n\n",(LPCSTR) (_bstr_t)
            pConnection->Properties->GetItem("OLE DB Version")->Value);
        printf("Provider Name   : %s\n\n",(LPCSTR) (_bstr_t)
            pConnection->Properties->GetItem("Provider Name")->Value);
        printf("Provider Version   : %s\n\n",(LPCSTR) (_bstr_t)
            pConnection->Properties->GetItem("Provider Version")->Value);
        printf("Driver Name   : %s\n\n",(LPCSTR) (_bstr_t)
            pConnection->Properties->GetItem("Driver Name")->Value);
        printf("Driver Version   : %s\n\n",(LPCSTR) (_bstr_t)
            pConnection->Properties->GetItem("Driver Version")->Value);
        printf("Driver ODBC Version   : %s\n\n",(LPCSTR) (_bstr_t)
            pConnection->Properties->GetItem("Driver ODBC Version")->Value);
    }
    catch (_com_error &e) {
        // Notify the user of errors if any.
        PrintProviderError(pConnection);
        PrintComError(e);
    }
    if (pConnection)
        if (pConnection->State == adStateOpen)
            pConnection->Close();
}
void PrintProviderError(_ConnectionPtr pConnection) {
    // Print Provider Errors from Connection object.
    // pErr is a record object in the Connection's Error collection.
    ErrorPtr pErr = NULL;
    if ( (pConnection->Errors->Count) > 0) {
        long nCount = pConnection->Errors->Count;
        // Collection ranges from 0 to nCount -1.
        for ( long i = 0 ; i < nCount ; i++) {
            pErr = pConnection->Errors->GetItem(i);
            printf("Error number: %x\t%s\n", pErr->Number, (LPCSTR) pErr->Description);
        }
    }
}
void PrintComError(_com_error &e) {
   _bstr_t bstrSource(e.Source());
   _bstr_t bstrDescription(e.Description());
    // Print Com errors.
   printf("Error\n");
   printf("\tCode = %08lx\n", e.Error());
   printf("\tCode meaning = %s\n", e.ErrorMessage());
   printf("\tSource = %s\n", (LPCSTR) bstrSource);
   printf("\tDescription = %s\n", (LPCSTR) bstrDescription);
}

“ADO Exception”의 227개의 댓글

  1. Cbd oil that works 2020
    It’s a shame you don’t have a donate button! I’d most certainly donate
    to this outstanding blog! I guess for now i’ll settle for book-marking and adding
    your RSS feed to my Google account. I look forward to new updates and will share this blog with my Facebook group.

    Chat soon! best rated cbd oil http://j.mp/3drY6lE cbd oil that works 2020 http://j.mp/3drY6lE

  2. Hey I know this is off topic but I was wondering if
    you knew of any widgets I could add to my blog that automatically tweet my newest twitter updates.
    I’ve been looking for a plug-in like this for quite some time
    and was hoping maybe you would have some experience with something like
    this. Please let me know if you run into anything.

    I truly enjoy reading your blog and I look forward to your new updates.

  3. Can I just say what a comfort to discover somebody who truly knows what they’re talking about over
    the internet. You definitely understand how to bring an issue to light and make it important.
    A lot more people should look at this and understand this side of the story.
    It’s surprising you are not more popular given that you surely have
    the gift.

  4. Do you mind if I quote a couple of your posts as long as I
    provide credit and sources back to your site? My blog is in the exact same niche as yours and my users
    would genuinely benefit from a lot of the information you present
    here. Please let me know if this ok with you. Thank you!

  5. I simply want to mention I am just new to blogging and site-building and certainly liked you’re blog. Very likely I’m want to bookmark your website . You really have superb writings. Thanks a lot for sharing with us your blog.

  6. Hi there! This article couldn’t be written any better!
    Going through this article reminds me of my previous
    roommate! He constantly kept preaching about this. I will send this
    post to him. Pretty sure he will have a very good read. I appreciate
    you for sharing!

  7. 핑백: kim ngưu và ma kết

  8. 핑백: đàn ông xử nữ phụ nữ nhân mã

  9. I just want to say I am just very new to blogging and site-building and definitely liked this website. Very likely I’m likely to bookmark your website . You definitely have impressive stories. Bless you for revealing your website page.

  10. 핑백: game danh bai online nhieu nguoi choi nhat

  11. whoah this blog is excellent i really like reading your articles. Stay up the great paintings! You already know, a lot of individuals are hunting round for this info, you can help them greatly.

  12. Its like you read my mind! You seem to know a lot about this, like you wrote the book in it or something. I think that you can do with some pics to drive the message home a little bit, but instead of that, this is wonderful blog. An excellent read. I will certainly be back.

  13. I just want to say I am newbie to blogging and definitely savored your web blog. Most likely I’m going to bookmark your website . You actually come with superb writings. Thanks a lot for sharing your webpage.

  14. 핑백: workout music mix 2020

  15. Howdy just wanted to give you a quick heads up. The words in your content seem to be running off the screen in Ie. I’m not sure if this is a formatting issue or something to do with web browser compatibility but I thought I’d post to let you know. The design and style look great though! Hope you get the issue solved soon. Cheers

  16. I know this if off topic but I’m looking into starting my own blog and was curious what all is required to get set up? I’m assuming having a blog like yours would cost a pretty penny? I’m not very internet smart so I’m not 100 positive. Any tips or advice would be greatly appreciated. Cheers

  17. This is very fascinating, You are an overly professional blogger. I’ve joined your rss feed and stay up for seeking extra of your wonderful post. Additionally, I’ve shared your site in my social networks!

  18. I just want to say I am all new to weblog and actually liked your blog. Probably I’m likely to bookmark your website . You really come with excellent posts. With thanks for sharing your website page.

  19. Having read this I thought it was really informative. I appreciate you finding the time and effort to put this content together. I once again find myself personally spending a lot of time both reading and posting comments. But so what, it was still worth it.

  20. One thing I would really like to touch upon is that weightloss routine fast may be possible by the perfect diet and exercise. People’s size not only affects appearance, but also the complete quality of life. Self-esteem, despression symptoms, health risks, as well as physical skills are influenced in an increase in weight. It is possible to make everything right whilst still having a gain. Should this happen, a condition may be the root cause. While excessive food instead of enough exercise are usually at fault, common health concerns and popular prescriptions can greatly help to increase size. Thanks for your post right here.

  21. Please let me know if you’re looking for a author for your blog. You have some really good posts and I believe I would be a good asset. If you ever want to take some of the load off, I’d love to write some content for your blog in exchange for a link back to mine. Please send me an email if interested. Thank you!

  22. Nice post. I learn something totally new and challenging on sites I stumbleupon on a daily basis. It will always be helpful to read through articles from other authors and practice something from other websites.

  23. Nice post. I understand some thing harder on diverse blogs everyday. It will always be stimulating to read content from other writers and rehearse something from their website. I’d opt to apply certain with the content in my small weblog whether you don’t mind. Natually I’ll offer you a link in your internet blog. Many thanks for sharing.

  24. I have not checked in here for a while because I thought it was getting boring, but the last several posts are good quality so I guess I¡¦ll add you back to my everyday bloglist. You deserve it my friend 🙂

  25. With havin so much content do you ever run into any issues of plagorism or copyright infringement? My website has a lot of unique content I’ve either created myself or outsourced but it looks like a lot of it is popping it up all over the web without my permission. Do you know any techniques to help reduce content from being stolen? I’d certainly appreciate it.

  26. 핑백: mơ thấy chuối chín

  27. I feel like I’m constantly looking for interesting things to read about a variety of subjects, but I manage to include your blog among my reads every day because you have compelling entries that I look forward to. Here’s hoping there’s a lot more amazing material coming!Julio Ramos

  28. Can I just say what a relief to discover somebody that truly knows what they are talking about on the net. You definitely realize how to bring an issue to light and make it important. A lot more people really need to check this out and understand this side of your story. I was surprised you’re not more popular because you certainly have the gift.

  29. I챠m amazed, I have to admit. Seldom do I encounter a blog that챠s equally educative and entertaining, and without a doubt, you’ve hit the nail on the head. The problem is something which not enough folks are speaking intelligently about. Now i’m very happy I came across this during my hunt for something concerning this.

  30. Hey there! This is kind of off topic but I need some guidance from an established blog. Is it hard to set up your own blog? I’m not very techincal but I can figure things out pretty fast. I’m thinking about creating my own but I’m not sure where to start. Do you have any points or suggestions? Many thanks

  31. hey there and thank you for your information – I’ve certainly picked up anything new from right here. I did however expertise a few technical issues using this site, since I experienced to reload the web site lots of times previous to I could get it to load correctly. I had been wondering if your hosting is OK? Not that I’m complaining, but sluggish loading instances times will sometimes affect your placement in google and could damage your quality score if ads and marketing with Adwords. Anyway I am adding this RSS to my email and can look out for a lot more of your respective intriguing content. Ensure that you update this again very soon..

  32. I keep listening to the reports speak about receiving free online grant applications so I have been looking around for the most excellent site to get one. Could you advise me please, where could i acquire some?

  33. I really love your site.. Great colors & theme. Did you create this website yourself? Please reply back as I’m attempting to create my very own site and would like to find out where you got this from or exactly what the theme is named. Thank you!

  34. Right here is the right blog for everyone who hopes to understand this topic. You know so much its almost hard to argue with you (not that I personally would want to…HaHa). You certainly put a brand new spin on a topic that’s been written about for decades. Wonderful stuff, just great.

  35. I’ve been exploring for a little for any high quality articles or blog posts on this sort of area . Exploring in Yahoo I at last stumbled upon this web site. Reading this information So i am happy to convey that I have a very good uncanny feeling I discovered just what I needed. I most certainly will make certain to do not forget this web site and give it a look regularly.

  36. It is appropriate time to make some plans for the future and it’s time to be happy. I’ve read this post and if I could I desire to suggest you few interesting things or advice. Maybe you could write next articles referring to this article. I desire to read more things about it!

  37. You are so awesome! I don’t think I’ve read through something like that before. So nice to discover someone with unique thoughts on this topic. Really.. thank you for starting this up. This site is one thing that is needed on the web, someone with a little originality.

  38. Hello! I could have sworn I’ve visited this blog before but after going through many of the posts I realized it’s new to me. Regardless, I’m certainly pleased I stumbled upon it and I’ll be book-marking it and checking back frequently!

  39. I have been absent for a while, but now I remember why I used to love this site. Thank you, I¡¦ll try and check back more frequently. How frequently you update your site?

  40. Your style is unique compared to other folks I’ve read stuff from. Thank you for posting when you have the opportunity, Guess I’ll just bookmark this web site.

  41. Write more, thats all I have to say. Literally, it seems as though you relied on the video to make your point. You clearly know what youre talking about, why throw away your intelligence on just posting videos to your blog when you could be giving us something informative to read?

  42. Having read this I believed it was rather informative. I appreciate you spending some time and energy to put this short article together. I once again find myself personally spending way too much time both reading and leaving comments. But so what, it was still worth it!

  43. Hello, i read your blog occasionally and i own a similar one and i was just curious if you get a lot of spam comments? If so how do you protect against it, any plugin or anything you can advise? I get so much lately it’s driving me crazy so any help is very much appreciated.

  44. I happen to be commenting to make you know of the extraordinary experience my friend’s princess had reading through your web site. She learned many pieces, most notably what it is like to possess a great coaching mood to have other individuals really easily understand selected problematic topics. You truly did more than visitors’ expected results. I appreciate you for providing these invaluable, trusted, edifying and even fun guidance on this topic to Sandra.

  45. Thanks , I have recently been searching for info approximately this subject for a while and yours is the best I have found out so far. But, what about the conclusion? Are you certain in regards to the source?

  46. I’ve been surfing online greater than 3 hours these days, yet I never found any fascinating article like yours. It’s lovely worth sufficient for me. Personally, if all webmasters and bloggers made just right content material as you did, the internet will be much more useful than ever before.

  47. Then using a razor, begin in the top rated plus shave lower with all the grain fostering in the backside : it’s recommended to take precisely what you’re executing using a modest reflect.

  48. I do love the way you have presented this specific difficulty and it does indeed offer us a lot of fodder for thought. Nonetheless, because of just what I have observed, I only hope as the actual feedback stack on that people stay on point and not start upon a tirade associated with the news du jour. Yet, thank you for this exceptional piece and although I do not go along with it in totality, I regard your perspective.

  49. I would like to thank you for the efforts you have put in writing this site. I’m hoping to check out the same high-grade blog posts from you later on as well. In truth, your creative writing abilities has inspired me to get my own, personal website now 😉

  50. This design is steller! You certainly know how to keep a reader amused. Between your wit and your videos, I was almost moved to start my own blog (well, almost…HaHa!) Excellent job. I really loved what you had to say, and more than that, how you presented it. Too cool!

  51. Hey there! Quick question that’s totally off topic. Do you know how to make your site mobile friendly? My weblog looks weird when browsing from my iphone. I’m trying to find a theme or plugin that might be able to resolve this problem. If you have any suggestions, please share. Thank you!

  52. Hey there just wanted to give you a quick heads up. The text in your post seem to be running off the screen in Chrome. I’m not sure if this is a formatting issue or something to do with internet browser compatibility but I thought I’d post to let you know. The layout look great though! Hope you get the problem resolved soon. Cheers

  53. Hmm it seems like your website ate my first comment (it was extremely long) so I guess I’ll just sum it up what I submitted and say, I’m thoroughly enjoying your blog. I as well am an aspiring blog writer but I’m still new to the whole thing. Do you have any suggestions for novice blog writers? I’d definitely appreciate it.

  54. I was just seeking this information for a while. After 6 hours of continuous Googleing, finally I got it in your site. I wonder what is the lack of Google strategy that don’t rank this kind of informative websites in top of the list. Generally the top websites are full of garbage.

  55. The other day, while I was at work, my sister stole my iPad and tested to see if it can survive a forty foot drop, just so she can be a youtube sensation. My iPad is now broken and she has 83 views. I know this is entirely off topic but I had to share it with someone!

  56. There are certainly lots of particulars like that to take into consideration. That is a great level to bring up. I provide the thoughts above as general inspiration however clearly there are questions like the one you carry up where an important factor might be working in trustworthy good faith. I don?t know if best practices have emerged round issues like that, but I am sure that your job is clearly identified as a fair game. Each girls and boys feel the impression of just a second’s pleasure, for the rest of their lives.

  57. Howdy this is somewhat of off topic but I was wondering if blogs use WYSIWYG editors or if you have to manually code with HTML. I’m starting a blog soon but have no coding know-how so I wanted to get advice from someone with experience. Any help would be greatly appreciated!

  58. I do agree with all the concepts you have presented on your post. They’re very convincing and can definitely work. Nonetheless, the posts are too short for novices. May you please prolong them a little from subsequent time? Thanks for the post.

  59. Throughout the grand scheme of things you actually receive an A just for hard work. Where you actually misplaced me personally was first in all the particulars. As people say, details make or break the argument.. And that could not be more correct here. Having said that, let me tell you just what did work. Your authoring is highly engaging and this is probably why I am taking the effort to comment. I do not make it a regular habit of doing that. Secondly, even though I can see a leaps in reason you come up with, I am not sure of how you appear to connect the details that help to make the actual final result. For now I will, no doubt yield to your point however wish in the near future you connect your dots much better.

  60. Definitely imagine that that you said. Your favourite reason seemed to be at the internet the simplest factor to keep in mind of. I say to you, I definitely get annoyed at the same time as people think about worries that they plainly do not know about. You controlled to hit the nail upon the top and outlined out the whole thing without having side effect , people can take a signal. Will likely be again to get more. Thank you

  61. I love your blog.. very nice colors & theme. Did you create this website yourself or did you hire someone to do it for you? Plz respond as I’m looking to design my own blog and would like to know where u got this from. many thanks

  62. I must say, as a lot as I enjoyed reading what you had to say, I couldnt help but lose interest after a while. Its as if you had a wonderful grasp on the subject matter, but you forgot to include your readers. Perhaps you should think about this from far more than one angle. Or maybe you shouldnt generalise so considerably. Its better if you think about what others may have to say instead of just going for a gut reaction to the subject. Think about adjusting your own believed process and giving others who may read this the benefit of the doubt.Jobs offered

  63. Hey there would you mind stating which blog platform you’re using? I’m looking to start my own blog soon but I’m having a difficult time choosing between BlogEngine/Wordpress/B2evolution and Drupal. The reason I ask is because your design and style seems different then most blogs and I’m looking for something unique. P.S Apologies for getting off-topic but I had to ask!

  64. Attractive element of content. I just stumbled upon your web site and in accession capital to assert that I acquire in fact enjoyed account your weblog posts. Any way I’ll be subscribing for your augment or even I achievement you get admission to persistently quickly.

  65. I would like to express my love for your kindness for men and women that must have help on that study. Your very own commitment to getting the message across appeared to be pretty significant and have truly helped somebody just like me to attain their endeavors. The important hints and tips denotes this much to me and substantially more to my peers. Thank you; from each one of us.

  66. There are actually plenty of details like that to take into consideration. That may be a great point to deliver up. I provide the ideas above as general inspiration but clearly there are questions like the one you carry up where a very powerful thing can be working in sincere good faith. I don?t know if greatest practices have emerged round issues like that, but I am positive that your job is clearly identified as a fair game. Each boys and girls feel the influence of just a second’s pleasure, for the rest of their lives.

  67. This is very attention-grabbing, You are an excessively skilled blogger. I’ve joined your rss feed and sit up for searching for extra of your wonderful post. Also, I have shared your web site in my social networks!

  68. Thank you for the sensible critique. Me & my neighbor were just preparing to do a little research about this. We got a grab a book from our local library but I think I learned more from this post. I am very glad to see such excellent information being shared freely out there.

  69. I simply wanted to thank you so much once more. I am not sure the things I might have worked on without the actual aspects documented by you directly on my field. It had been an absolute challenging condition in my circumstances, but encountering the very well-written strategy you resolved it made me to cry with joy. I am just happier for your guidance and then wish you find out what an amazing job you are always undertaking educating some other people thru your web site. I know that you have never come across all of us.

  70. You really make it appear so easy with your presentation however I find this topic to be really something that I feel I’d never understand. It seems too complicated and extremely vast for me. I’m having a look ahead in your next publish, I’ll try to get the cling of it!

  71. May I simply just say what a relief to uncover a person that truly knows what they’re talking about over the internet. You certainly understand how to bring a problem to light and make it important. More and more people have to read this and understand this side of your story. I can’t believe you’re not more popular since you most certainly have the gift.

  72. Greetings, I do believe your site could possibly be having internet browser compatibility problems. Whenever I take a look at your site in Safari, it looks fine however, if opening in Internet Explorer, it’s got some overlapping issues. I simply wanted to provide you with a quick heads up! Besides that, excellent site.

  73. Great goods from you, man. I have take note your stuff previous to and you are simply too magnificent. I actually like what you have acquired here, really like what you’re stating and the best way during which you assert it. You are making it enjoyable and you continue to take care of to keep it smart. I cant wait to read much more from you. This is really a great website.

  74. Great beat ! I wish to apprentice while you amend your website, how can i subscribe for a blog web site? The account aided me a acceptable deal. I had been a little bit acquainted of this your broadcast provided bright clear concept

  75. Do you mind if I quote a few of your articles as long as I provide credit and sources back to your webpage? My website is in the exact same niche as yours and my users would certainly benefit from a lot of the information you provide here. Please let me know if this okay with you. Thanks!

  76. I want to voice my respect for your kind-heartedness in support of those people who actually need help with in this field. Your special commitment to getting the solution all-around ended up being remarkably beneficial and has in every case helped associates much like me to realize their dreams. Your entire valuable facts means a great deal to me and additionally to my office colleagues. Best wishes; from all of us.

  77. It’s the best time to make some plans for the longer term and it’s time to be happy. I have read this post and if I may I wish to recommend you few interesting things or advice. Perhaps you can write next articles referring to this article. I want to read more things about it!

  78. Having read this I believed it was extremely enlightening. I appreciate you taking the time and energy to put this content together. I once again find myself spending a lot of time both reading and leaving comments. But so what, it was still worth it!

  79. Do you mind if I quote a few of your articles as long as I provide credit and sources back to your site? My blog is in the exact same niche as yours and my visitors would really benefit from some of the information you provide here. Please let me know if this ok with you. Cheers!

  80. Having read this I thought it was rather enlightening. I appreciate you spending some time and energy to put this informative article together. I once again find myself personally spending a significant amount of time both reading and commenting. But so what, it was still worth it.

  81. Thank you for sharing superb informations. Your website is so cool. I’m impressed by the details that you have on this site. It reveals how nicely you understand this subject. Bookmarked this website page, will come back for more articles. You, my friend, ROCK! I found simply the info I already searched all over the place and simply couldn’t come across. What a perfect web site.

  82. Woah! I’m really digging the template/theme of this site. It’s simple, yet effective. A lot of times it’s challenging to get that “perfect balance” between usability and visual appearance. I must say that you’ve done a fantastic job with this. Additionally, the blog loads very fast for me on Opera. Superb Blog!

  83. Hiya, I’m really glad I have found this information. Today bloggers publish just about gossips and web and this is really irritating. A good site with interesting content, that is what I need. Thank you for keeping this web-site, I’ll be visiting it. Do you do newsletters? Can not find it.

  84. Hmm it seems like your site ate my first comment (it was super long) so I guess I’ll just sum it up what I submitted and say, I’m thoroughly enjoying your blog. I as well am an aspiring blog blogger but I’m still new to the whole thing. Do you have any recommendations for newbie blog writers? I’d definitely appreciate it.

  85. Howdy this is kinda of off topic but I was wondering if blogs use WYSIWYG editors or if you have to manually code with HTML. I’m starting a blog soon but have no coding expertise so I wanted to get guidance from someone with experience. Any help would be enormously appreciated!

  86. You are so cool! I don’t think I’ve truly read through a single thing like that before. So wonderful to discover someone with genuine thoughts on this topic. Really.. many thanks for starting this up. This site is one thing that is needed on the internet, someone with a bit of originality!

  87. Great beat ! I would like to apprentice even as you amend your web site, how could i subscribe for a weblog site? The account aided me a appropriate deal. I were tiny bit familiar of this your broadcast offered vibrant clear idea

  88. I know this if off topic but I’m looking into starting my own weblog and was wondering what all is needed to get setup? I’m assuming having a blog like yours would cost a pretty penny? I’m not very internet savvy so I’m not 100 sure. Any recommendations or advice would be greatly appreciated. Many thanks

  89. I’m impressed, I have to say. Really hardly ever do I encounter a blog that’s both educative and entertaining, and let me tell you, you have got hit the nail on the head. Your concept is excellent; the issue is one thing that not sufficient persons are talking intelligently about. I’m very comfortable that I stumbled throughout this in my seek for something relating to this.

  90. Do you mind if I quote a couple of your articles as long as I provide credit and sources back to your website? My blog is in the very same area of interest as yours and my users would definitely benefit from some of the information you provide here. Please let me know if this alright with you. Thank you!

댓글 남기기