Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HELP COM object please

Status
Not open for further replies.

cfm

Programmer
Mar 27, 2001
76
CL
hello,

how can I invoque a COm object remotly?

Local:

it worked.

<cfinclude template=&quot;adoscript.cfm&quot;>
<cfobject class=&quot;ADODB.Connection&quot; type=&quot;COM&quot; action=&quot;CREATE&quot; name=&quot;ado&quot;>

but, remote not work

<cfinclude template=&quot;adoscript.cfm&quot;>
<cfobject class=&quot;ADODB.Connection&quot; type=&quot;COM&quot; action=&quot;CREATE&quot; name=&quot;ado&quot; server=&quot;192.168.1.7&quot; context=&quot;REMOTE&quot;>

I need configure something in the remote server??

 
ahhh.. it is a local network.
 
I am trying the same code:
<cfobject class=&quot;ADODB.Connection&quot; type=&quot;COM&quot; action=&quot;CREATE&quot; name=&quot;conn&quot;>
But when I try to call the source, I get the following error:
Error building an argument list for: OPEN

Here are the settings I provide:
<cfset ConnectionObject.Provider = &quot;sqloledb&quot;>
<cfset ConnectionObject.Properties.DataSource = &quot;server_name&quot;>
<cfset ConnectionObject.Properties.InitialCatalog = &quot;db_name&quot;>
<cfset ConnectionObject.uid = &quot;user_name&quot;>
<cfset ConnectionObject.pwd = &quot;pwd_name&quot;>
<cfset ConnectionObject.Open()>

What am I missing?
 
You're referencing &quot;ConnectionObject&quot; instead of &quot;conn&quot;. The COM object has been created and named &quot;conn&quot;, not &quot;ConnectionObject&quot;.

-Tek
 
Thanks for your input, but I figured it out:

<cfobject type=&quot;COM&quot;
name=&quot;MyConn&quot;
class=&quot;ADODB.Connection&quot;
action=&quot;CREATE&quot;>
<!--- Open the new connection --->
<cfset dsn = &quot;DRIVER={SQL Server};SERVER=server_name;DATABASE=db_name&quot;>

<cfset MyConn.Open(&quot;#dsn#&quot;, &quot;username&quot;, &quot;password&quot;, -1)>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top