Re: Cannot Open SQL Server Table in Access.ADP File.



because stored procedures can depend on views.. views can depend on
views also so you're probably not out of the woods yet

I dont think that SQL Server will take 'veiw dependencies' into effect;
but you're right-- I agree-- it should work better

-Aaron




Greg wrote:
It appears I have found a solution to my problem. I don't understand why the
Generate Script Wizard did not work on my original database, but it is now
working.

After fixing some of my tables and a few stored procedures and views,
instead of generating a script containing ALL database objects, I create four
seperate script files instead. I create a script file for each of the
following:

1. Tables
2. User Defined Functions
3. Views
4. Stored Procedures.

Then, I ran them seperately in the same order. They all processed without
any errors. Now, once my new database has been created I am able to run the
Generate Script Wizard for the entire database and the script will
successfully build my entire database without errors. What bothers me is that
I don't know "why" this worked. It seems to me the Script Wizard should have
worked properly the first time and that I should noit have had to go through
so many steps like this.

Anyway, I am up and running now and have only one remaining issue:

The Generate Script Wizard does not provide an option to move over my
Diagrams. I created about 20 diagrams to make it easier to see how my
database is built. How can I generate a script to recreate my Diagrams in my
new database?

Thansk for your help.

"Sylvain Lafontaine" wrote:

Many possibilities here, the most probable one would be that you forget to
set the primary key for your tables in your scripts.

Other possiblities would be that you didn't refresh the database window
after creating the tables/views/SP; for example by closing/reopening the ADP
application. This can be important if you are using ADP to recreate the
database instead of using another pgm.

Finally, make sure that you specify dbo as the owner (or the schema under
SQL-Server 2005) for all your tables/ views/ functions/ stored procedures;
otherwise, you can run into a lot of trouble.

--
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)


"Greg" <AccessVBAnet@xxxxxxxxxxxxxxxxx> wrote in message
news:304E2DEF-3D32-41C2-AFE0-CABC5E6985C7@xxxxxxxxxxxxxxxx
I don't expect to get an answer, but I just need to post something.

I have an SQL Server 2005 database which functions properly with my
Access.ADP application. In preparing my backend database for shipment I
ran
the Generate Script Wizard to recreate the SQL Server Database. The Wizard
in
generaly generate a lot of errors of which i could not diagnose, but I was
able to work around. Subsequently, I now have a SQL Script that builds my
new
SQL Server database ready for shipment.

What is happening now has me completely stuck. Several of my tables cannot
be accessed in my Access.ADP application. For example, I have a table
named
tblObject that appears to be completely intact within SQL Server. You can
view the data structure, add data to it from SQL, etc. It appears to be
100%
fine. But, when I attempt to open the table from within the Access DB
Window
I get an error. Several different errors or messages actually.

The first time I click on the table I get a message reporting the "stored
procedure ran successfully but returned no records", even though there are
records in it. Then, If I attempt to open another table, it opens. For
example, I opened tblForm and viewed the table with no problem. After that
then, I go back and double-click on the tblObject table and now I get a
message "the field FormID is read-only" and the table does not open. It
appears the what ever table I successfully opened last will have it's
primary
key displayed in a message box "the field FormID is read-only".

Thus, my database is rendered useless. Has anyone come across such
behavior.
At this point, I am finding the Script Building features for SQL Server
2005
to be unreliable.

Is there a know bug of some sort.




.



Relevant Pages

  • Re: Serious errors with Create view command
    ... the database is opened? ... There's no database on earth that behaves that way! ... What on EARTH does the option of 'Edit Stored procedures' do? ... I can't paste it INTO the view designer sql view ...
    (microsoft.public.fox.helpwanted)
  • Re: Enterprise Manager Newbie Question
    ... a SQL backup is not a simple copy of the database files. ... Is it possible to write a script that one could run from a workstation and ...
    (microsoft.public.sqlserver.tools)
  • Re: SQL Security
    ... except I'm having problems making it work in a script. ... ;Set properties of DB objects and open connection to database ... > from Books Online (within the SQL Server program group): ... > communicate with SQL Server. ...
    (microsoft.public.sqlserver.server)
  • Re: Transaction Oriented Architecture (TOA)
    ... OOP is not required to wrap SQL. ... of stored procedures to act as an API for application programmers ... writing code against the database. ... With a well-defined API in place, ...
    (comp.object)
  • Re: Vista hosting XPe tools/db
    ... Are you running this script on the machine that actually has the SQL server ... machine hosting the database. ... i don't know if you can install a second instance of SQL ...
    (microsoft.public.windowsxp.embedded)