mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Mar 2003
Posts: 9
N
NMB Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
N
Joined: Mar 2003
Posts: 9
ok check this out...
alias testdb {
comopen test Adodb.Connection
echo -s provider: $com(test,Provider,4,bstr,Microsoft.Jet.OLEDB.4.0)
echo -s connstring: $com(test,ConnectionString,4,bstr,test.mdb)
echo -s open $com(test,Open,3)
echo -s SQL: $com(test,execute,4,bstr,insert into silikon (nick) values ('write this'))
comclose test
}

this snippet will type "write this" to the position nick in the table silikon in the databas test.mdb...

this works 100% as i want it... but i want to read from this databas to... soo...

alias testdb2 {
comopen test Adodb.Connection
echo -s provider: $com(test,Provider,4,bstr,Microsoft.Jet.OLEDB.4.0)
echo -s connstring: $com(test,ConnectionString,4,bstr,test.mdb)
echo -s open $com(test,Open,3)
echo -s SQL: $com(test,execute,4,bstr,select nick from silikon order by id)
comclose test
}


ok... im not realy into normal coding and such... but in "basic code languages (VB & ASP and so on)" the thing i want would look like this "set recset = test.execute("select nick from silikon order by id")" but in mirc i don't closer to this then "$com(test,execute,4,bstr,select nick from silikon order by id)" if i would proceed with basic code to get the info then i would have use "recset("nick")" to get a value from the nick place in the silikon table.


i read about dispatch and unknown in the mirc help and noticed pointers... but i didn't realy understand it... is that maybe what i need to learn to get this to work?


anyhow... please help me... i've looked everyplace i know to look at...
THANKS ON FOREHAND

-----this post is belong l337 ----

Joined: Mar 2003
Posts: 48
F
Ameglian cow
Offline
Ameglian cow
F
Joined: Mar 2003
Posts: 48
watcha think to use the same database?

in the first [like you said] your using test.mdb
And in the second you are using database silikon :
select name from [databasename]

Joined: Mar 2003
Posts: 9
N
NMB Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
N
Joined: Mar 2003
Posts: 9

set recset = test.execute("select nick from ex1 where nick = "NMB")
document.write recset("nick")

I just want to get a Value from recset("nick")


Link Copied to Clipboard