Terry > I\'m working with Access Tables. It\'s a database that is converted from a Compaq Himmalaya Server to an Access Database. I am writing a project on SQL optimization and I thought that stored procedures was an important issue.
CREATE PROCEDURE spTest AS SELECT ordnr, ordevtti FROM ordevent WHERE event = \'r1cr\' AND task = \'ediimpc\' AND subprod = \'C\' OR event =\'m1cr\' AND task = \'ediimpc\' AND subprod = \'C\' AND ordevtti LIKE (\'2001-07-23\' + \'%\')
mose>OK, interesting. As I said, and Thomas too, STORED PROCEDURES in Access 2000 are possible. They are as far as I can make out intended for use with adp (Access Data Projects) as benny.. states. Adp is for use with SQL Server and MSDE but I ma lead to believe that they can be used with Access (jet) databases too.
Thomas> We were involved in a question a while back concerning Stored procedures, along with proaccess. I cant find this anywhere, do you have a reference to it by chance?
Hov, Mose! Hvorfor får du en ODBC-fejl??? Hvis du benytter ODBC, burde du jo ikke have noget med ODBC at gøre!? Er du sikker på at tabellerne ikke bare er sammenkædet med din Himmalaya-server?
Thomas > Jeg benytter ODBC til at connecte til databasen. Databasen har jeg liggende lokalt i Access 2000 format, og det går helt uden om Himmalaya\'en.
var test = Server.CreateObject(\"ADODB.Connection\"); test.Open = \"ArchiveDB\"; test.Execute(\"CREATE PROCEDURE spTest AS SELECT ordnr, ordevtti From ORDEVENT WHERE event = \'r1cr\' AND task = \'ediimpc\' AND subprod = \'C\' OR event =\'m1cr\' AND task = \'ediimpc\' AND subprod = \'C\' AND ordevtti LIKE (\'2001-07-23\' + \'%\')\") test.Close(); %>
So after all this we arent talking ACCESS :o( I think you will have to create the stored procedures through Access and not ASP or what ever your using.
to create the Stored Procedure. It gave me the exact same error. I\'m not very familiar with Access, and I have searched in the help file for issues regarden Creation fo Stored Procedures, but I found nothing. Therefore I tried to create it throug Active Server Pages.
How can I make a Stored Procedure directly in Access ?
mose> Well I dont intend to be an ekspert at ASP, but it looks as though you can create SP from ASP, sounds logical! What I would do though, is use the example EXACTLY as it is before going on to your own SP. This will eliminate any other errors creaping in and causing confusion to the actual question placed. (Kan man lave en Stored Procedure i Access?) Yes they can, as the example also states. But as I mention, lets get a simple test working first and then move on from there.
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.