mIRC Homepage

COM Objects & writing to Access

Posted By: root

COM Objects & writing to Access - 31/07/03 08:34 PM

A little help is needed here, im trying to make a dialog to write to excel. I found a little help and me and this guy `online` came up with the following;
;alias excel {
; echo $excel(file,sheet,row,line)
;comopen e Excel.Application
;if $comerr || !$isdde(excel) || !$isfile($1) { return }
;dde -e excel system [open(" $+ $1 $+ ")]
;var -s %data = $dde(excel,$+([,$nopath($1),],$2),$+(R,$3,C,$4))
;dde -e excel system [quit()]
;comclose e
;return %data
;}


can any of you out there help me finish this?
Im using 6.3 and trying to write to microsoft access
Posted By: Online

Re: COM Objects & writing to Access - 01/08/03 01:50 AM

Hi, check out this post. His /testdb alias is probably what you need. If not, please clarify your question and I (or anyone else reading this board) will try to help.
Posted By: CloCkWeRX

Re: COM Objects & writing to Access - 01/08/03 02:15 AM

There's two ways to go about it; to launch Access via COM as an application or to use "ADOdc"

ADOdc is a wrapper class that is meant to take the hassle out of writing to and from databases.

ADOdc is the better solution here. You will want to heckle VB forums about its use.

Let me say that while its great you want to use COM, its not so great that your running into heckles like this.
You should be experienced in COM (Or at least VB) to take on a task of this size.

Might I suggest you reconsider and make use of the mySQL DLL on mircscripts.org? It's an easier solution by half (IMHO)

I'm sorry to say I'm not experienced enough with ADOdc to help you out in completing the script; not many people on this forum would be.

--
*DOH*
I went away from the PC and online slips in a post. Well, I guess I'm wrong :P
Posted By: root

Re: COM Objects & writing to Access - 04/08/03 03:20 PM

Well to clarify my question, i have a database in microsoft access, and i am trying to make a dialog(dialog is easy) to write to access(hard) and to notepad(easy) while also writing to an html submission site(eh, easy), to save me a lot of time. I know a little of mIRC, which is how i can write to the html and notepad, but this writing to access im compleatly baffled. The previous alias (on the top) was created by me and someone else but it writes to excel and we recently changed to access. Maybe AOHdc could help but I dont know nothing about it, or COM or even VB, so im asking anyone to help if you can, hope that clarifies it up.

Again im using 6.03 on windows 98. Could also be ran on windows XP if that makes it easier for you helpers.
Posted By: root

Re: COM Objects & writing to Access - 06/08/03 04:25 PM

No help?
Im compleatly lost with it all
Posted By: Hammer

Re: COM Objects & writing to Access - 06/08/03 07:39 PM

Are you simply trying to execute an INSERT INTO or UPDATE SQL statement against the database? $com can do that easily enough. Create your ADOdb.Connection object and use its Execute method and send it your %sql statement.
Posted By: root

Re: COM Objects & writing to Access - 06/08/03 09:21 PM

Quote:
Are you simply trying to execute an INSERT INTO or UPDATE SQL statement against the database? $com can do that easily enough. Create your ADOdb.Connection object and use its Execute method and send it your %sql statement.

Slow down there, i have no idea what you said. Let me rephrase, im very bad with COM objects and that previous code was developed by myself and someone else. Sorry if my question is unclear but im just trying to write from mirc to numerious documents, one of which is access and the only one i dont know how to write to.

Again running this on 6.03 and on windows 98 and xp
© 2021 mIRC Discussion Forums