I have an app that prints out reports at a specific time. when i started it, i just had it print a generic .rpt file with a "Hello World!" text message, and everything went fine. then i created a real report, based on an access query that returns all the fields from a table matching an ID field, your basic Select * From _ Where ID=""
Well now it gives me a "runtime error 20599: cannot open SQL server" which i believe has to do with the fact that the report needs to logon to the db to use the query. but i've tried several different appoaches :
CR1.Connect= "DSN=#MyDSN#;UID=admin;PWD=;DSQ=#myDB#"
CR1.DataFiles(0) = "Proc(MyQuery)"
OR
CR1.LogOnServer "{Microsoft Access Driver (*.mdb)}", "#MyDSN#", "#myDBPath#", "admin", ""
^^this one gives me a "cannot logon to server" error
my question is...what am i NOT doing, is it a real simple line, or what...i've seen other code,long code, that avoids using the ocx all together, but i like using it. I appreciate any help you guys can give me, as this is a rather time sensitive matter.
Thanks!!
-jacob
Details:
CR8.5; VB6; CR Control; ODBC(?);
Well now it gives me a "runtime error 20599: cannot open SQL server" which i believe has to do with the fact that the report needs to logon to the db to use the query. but i've tried several different appoaches :
CR1.Connect= "DSN=#MyDSN#;UID=admin;PWD=;DSQ=#myDB#"
CR1.DataFiles(0) = "Proc(MyQuery)"
OR
CR1.LogOnServer "{Microsoft Access Driver (*.mdb)}", "#MyDSN#", "#myDBPath#", "admin", ""
^^this one gives me a "cannot logon to server" error
my question is...what am i NOT doing, is it a real simple line, or what...i've seen other code,long code, that avoids using the ocx all together, but i like using it. I appreciate any help you guys can give me, as this is a rather time sensitive matter.
Thanks!!
-jacob
Details:
CR8.5; VB6; CR Control; ODBC(?);