Re: fun with odbc... :-(
- From: Volker Hetzer <volker.hetzer@xxxxxxxx>
- Date: Mon, 07 Nov 2005 16:12:13 +0100
Bob Barrows [MVP] wrote:
Volker Hetzer wrote:
Hi! I'm trying to use odbc.
Your first mistake ;-) http://www.aspfaq.com/show.asp?id=2126
Ok, I tried a connection string, if I really need to use odbc or oledb I'll try again.
So far I've got a dsn, can connect,
execute a query and retrieve the rows. However, upon script exit the script crashes.
This is my script:
set db=createobject("ADODB.Connection") db.open("dsn=ecadbib;uid=layoutchecks_hetzer;pwd=layoutchecks_hetzer")
You probably should have censored the password ...
Don't worry about the password :-)
set Rows=db.execute("select sysdate from dual") do until Rows.EOF msgBox(Rows("SYSDATE")) Rows.MoveNext loop Rows.Close msgbox("Here") db.Close msgbox("Here")
Now, whenever I leave out one of the two message boxes (or both), the script crashes. It also crashes when I use wscript.createobject instead of just createobject.
What kind of crash? Are you forced to reboot your machine? Kill the process using Task Manager? Do you get an error message?
I get a message, looks like a typical memory error. (Instruction at 0x7c921e58 points to 0xffffffff.)
FWIW, I see nothing glaringly wrong here.
Maybe try explicitly setting the ADO objects to Nothing: Rows.Close: Set Rows=Nothing db.Close: Set db = Nothing
Tried that too, no difference.
I'm beginning to suspect oracles odbc driver. However, since using oracles own oledb server works flawlessly I'm inclined to use that one, unless my boss forces me into the standard driver.
Lots of Greetings and thanks! Volker .
- References:
- fun with odbc... :-(
- From: Volker Hetzer
- Re: fun with odbc... :-(
- From: Bob Barrows [MVP]
- fun with odbc... :-(
- Prev by Date: Re: Update Access Database
- Next by Date: Re: convert FAT32 to NTFS problem?
- Previous by thread: Re: fun with odbc... :-(
- Next by thread: Compare profile/logon script on accounts on old domain/AD domain
- Index(es):
Relevant Pages
|