• Browse Blogs
  • My Blog
  • My Updates

+Tags Get help with tags?

  • View as cloud  | list

+ Similar Entries

photo

8.5.1 UN-FAIL! The F...

Blog:  Erik Brooks
Erik Brooks
Updated 
No RatingsRatings 0     CommentsComments 6
photo

Lotus Knows How To W...

Blog:  Beyond The Ye...
Peter Presnell
Updated 
No RatingsRatings 0     CommentsComments 1
photo

8.5.1 FAIL. Your cod...

Blog:  Erik Brooks
Erik Brooks
Updated 
RatingsRatings 6     CommentsComments 26
photo

8.5.2 Notes/Domino d...

Blog:  Erik Brooks
Erik Brooks
Updated 
No RatingsRatings 0     No CommentsComments 0
photo

Domino on the Web? Y...

Blog:  Erik Brooks
Erik Brooks
Updated 
No RatingsRatings 0     CommentsComments 2

+ Bookmarks

+ Blog Authors  

Working with SQL Server

Brett Patterson |   | Tags:  sql database connectivity notes | Comments (0)  |  Visits (271)
How many of you out there have to write LotusScript  code to access MS SQL Server?  Lucky for me, I get to do it all the time.  Since I'm in a Windows-based environment, I tend to use 'ado' objects to do my connecting.  One of the advantages of using ado is that there are thousands of VB examples of connecting to SQL Server.  So, I started by simply copying and pasting those examples into my LotusScript and viola....Error messages!  But, most of those errors were because I hadn't defined all of those constants that VB uses.  Things like 'adCmdText'.  Well, rather than define those over and over, here's a quick little tip.

Find the file called 'adovbs.inc'  It's usually located in the '\\Program Files\Common Files\System\ado' directory.  Open it with Notepad, copy it, paste it into a new script library and save the library.  (I save mine as adovbs.inc.)  Now, simply "Use" that script library and you never have to worry about defining those VB constants ever again.

If you ever have any other questions about connecting to SQL Server, drop me a line, I'd be happy to help where I can.  Then, you too, can be writing things like "SELECT * FROM Users WHERE clue >0" and get empty result sets.

Have fun!
No RatingsRatings 0

Comments (0)

There are no comments to display Add a Comment Add a Comment

Previous |  Main  | Next
Skip to main content link. Accesskey S
IBM Lotus Connections Help Tools About