Home
|
Forums
|
Contact
|
Search
|
Syndication
[login]
[create account]
Sunday, August 24, 2025
slxdeveloper.com
Home
Search
Contact us
About slxdeveloper
Syndication
Community
Forums
(NEW!)
Newsletter Archive
Members
Your Profile
Submit Article
General
Administration
(6)
OLE DB Provider
Miscellaneous
(2)
Architect
VBScript
(9)
ActiveX Controls
(6)
How To's
(14)
.NET Extensions
(3)
External
OLE DB Provider
(12)
SLAPI (SlgxApi.dll)
SalesLogix COM
(1)
Web
ASP/ASP.NET
(2)
Web Services
Web Client
Downloads
Samples
(17)
Documentation
(7)
Utilities
(18)
Resources
SalesLogix
(3)
Programming
(1)
8/24/2025 12:39:03 PM
slxdeveloper.com Community Forums
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
Architect Forums - SalesLogix Scripting & Customization
Forum to discuss writing script in Architect plugins for SalesLogix & general SalesLogix customization topics
(for Windows client only)
. View the
code of conduct
for posting guidelines.
Forums RSS Feed
Back to Forum List
|
Back to SalesLogix Scripting & Customization
|
New Thread
View:
Dynamic
Flat
Tree
Search:
Author
Thread: Create connection using ADO instead of GetNewConnection?
Mark Hanford
Posts: 131
Create connection using ADO instead of GetNewConnection?
Posted: 01 Jul 08 11:10 AM
I'm having some trouble getting a connection working when I can't use Application.GetNewConnection (I'm going to be running as an agent task)
Sub UpdateScores()
Dim Conn
Dim ConnString
ConnString = "Provider=SLXOLEDB.1;Data Source=servername;Initial Catalog=dbname;...etc..."
Conn = CreateObject("ADODB.Connection")
Conn.Open ConnString
'...rest of sub...
End Sub
The problem is that my "Conn" is always set to an empty string on the CreateObject line above.
[
Reply
][
Quote
]
Ryan Farley
Posts: 2265
Re: Create connection using ADO instead of GetNewConnection?
Posted: 01 Jul 08 11:24 AM
So you mean that conn is a null or empty object, is that right? I just want to make sure you're not testing it as a string to see if things are OK (because it is not a string).
One thing I see in your code that is missing is you need to "set" the object reference when you use CreateObject.
Set
Conn = CreateObject("ADODB.Connection")
Conn.Open ConnString
Make that change and give it a try. If it still doesn't work, are you getting any kind of error or anything?
[
Reply
][
Quote
]
Mark Hanford
Posts: 131
Re: Create connection using ADO instead of GetNewConnection?
Posted: 02 Jul 08 5:10 AM
Heh, seems that rewriting the horrible old code (for the second time) was just too much for me at the end of the day.
In this case I had missed the "Set" out, so the Conn was being cast as a String("") - which confused me. It's been a while since I've dabbled with ADO :D
Thanks for the tip - luckily my omission survived the copying-and-simplify process for the example!
[
Reply
][
Quote
]
Page 1 of 1
You can subscribe to receive a daily forum digest in your
user profile
. View the site
code of conduct
for posting guidelines.
Forum RSS Feed
-
Subscribe to the forum RSS feed to keep on top of the latest forum activity!
slxdeveloper.com is brought to you courtesy of
Ryan Farley
&
Customer FX Corporation
.
This site, and all contents herein, are Copyright © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.
code of conduct
|
page cache (param): 8/24/2025 1:08:31 PM