|
|
Can you recommend so easy and inexpensive ways to learn
about SQL Server 2005 or SQL Server 2005 Express. |
| |
SQL Server 2005 is the five-years-in-the-making upgrade
for SQL Server 2000. In the process of the upgrade, Microsoft made
numerous improvements to SQL Server 2005 with a special focus to making
SQL Server more enterprise ready. At the same time, Microsoft didn't
forget the small business market either with its release of the SQL Server
2005 Express. SQL Server 2005 Express is a special edition of SQL Server
2005 that addresses the small business market. SQL Server 2005
Express is fully compatible with SQL Server 2005. However, SQL
Server 2005 Express does not contain many of the enterprise features
available in SQL Server 2005.
SQL Server 2005 Express interoperates particularly well with Visual
Basic 2005 Express and Visual Web Developer 2005 Express. Through
November 7, 2007, all three packages are available without charge from
Microsoft. Therefore, they represent a compelling choice for
organizations and individuals in search of free, quality software.
You can learn more about how to use SQL Server 2005 Express from:
|
|
|
I am getting the following message from an Access adp
file: THIS DATABASE IS IN AN UNEXPECTED STATE; MICROSOFT ACCESS CAN'T OPEN
IT. What can I do to recover from the error? |
| |
I would start to diagnose this error by closing Access and
trying to open the SQL Server database any other way. If you have the SQL
Server client tools, you can attempt to open the SQL Server database with
either or Enterprise Manager or Query Analyzer. If you do not have the
client tools, then test an ADO connection in an mdb file to the database.
If you can get to the database with any of these methods, then the problem
is with your adp file. Close the file and try to open it again with the
original adp. If that doesn’t work, try creating a new adp file and see
if you can connect to the database with the new adp file. Then, copy
objects from the old adp file to the new one. If you cannot connect to
the SQL Server database with any other tool, your problem may be either
the database or the SQL Server. Try stopping and restarting SQL Server.
Then, see if you can open the database. If that does not yield fruitful
results, you might try detaching and then attaching the .mdf file for the
database. You can find the details of how to do this from Books Online or
you can get help with the topic from our recommended
Access 2003 book. |
|
|
I have heard that Jet is on legacy or maintenance mode.
What will Microsoft use for a small db replacement for Jet. |
| |
When a product goes on maintenance mode, Microsoft is
saying the product is no longer strategic as a development tool. Exactly when Jet disappears
depends, in part, on its users. It looks like the Office team may
have a bigger part in Jet going forward so that it becomes more of an
end-user tool and less of a development tool. My guess is that you’ll still have Jet
with Access 2006 (or whatever they call the next version of Access), and
it may last another version or so after that. As for Microsoft plans for
a replacement, nobody knows for sure. MSDE used to interoperate with
reasonably well with Access. However, MSDE has been replaced by SQL
Server 2005 Express. I have not noticed any "offiicial" comments
from Microsoft about Access/SQL Server Express interoperability. The
Office team seems intent on re-designing the Access UI for end users as
opposed to making Access/Jet developer-friendly. The new availability of
the Express suite, including packages such as SQL Server Express, Visual
Basic Express, and Visual Web Developer Express, without charge makes
Access relatively less appealing as a low-end developer tool. After
the new stuff with improved functionality is available without charge from
Microsoft. To find out more about the new Express suite developer
tools see information about my latest book. |
|
|
I'm hoping to find the downloads for "Professional SQL
Server Development with Access 2000" since Wrox no longer offers them.
Can you let me know where I can get them? |
| |
Betty White, a registered ProgrammingMSAccess.com site
visitor, tracked down the book's files at the Apress.com site. We
can't say how long they will be there, but they are there as of 8/1/2003.
The URL is
http://support.apress.com/books.asp?bID=1861004834&s=0&Go=Select+Book. |
|
|
I am currently developing a reporting application.
What database to use? – MS Access or SQL server? Could you tell me what
criteria I need to consider to make a decision? |
| |
Both databases are excellent for their proper contexts,
but the contexts in which both excel is different. Access is best for
single-user and departmental solutions with 20 or fewer concurrent users.
In addition, it is best if no individual table exceed several tens of
thousands of rows. Overall, Access has a maximum database file size of 2
GB.
While Access is a file-server database manager, SQL Server is a
client/server database manager. Microsoft also encourages the use of SQL
Server in n-tier solutions. SQL Server is best for large
departmental applications as well as enterprise solutions. Database sizes
can reach to terabyte size and the SQL Server can accommodate many more
concurrent users than with Access. Developing solutions for SQL Server
typically requires more advanced skills. Therefore, unless you have
advanced programming and database skills, you may find Access a friendlier
development environment.
The distinctions mentioned above are not hard and fast. Many excellent
Access developers are adept at creating Access solutions for lots of users
with very large databases. However, unless you are committed to Access, it
is typically easier to create big solutions in SQL Server. If you have a
small solution, Access will almost always be preferable in terms of cost
and effort in comparison to SQL Server. |
|
|
I
was running MSDE and it had web access. Recently, the login to my
SQL Server changed. What happened? |
| |
You
could have been attacked by the SQLSpida worm. This worm attacks
SQL Server instances and MSDE installations with an sa login of no
password. Basically, the worm changes the password for the sa
login. If you use the sa login to gain access to your MSDE, the
approach can lock you out.
You need to change the password for the sa login. The
short-term solution is to change the password for the sa login to one
that you set. This will let you login again. The longer-term
solution is to learn about SQL Server security. For those using
Access 2000 and SQL Server 7 (or the comparable MSDE version) see the
appendix to Professional
SQL Server Development with Access 2000. For those working
with Access 2002 and SQL Server 2000 (or the comparable MSDE
version) see Chapter 15 in Programming
Microsoft Access Version 2002. |
|
|
I
am an Access developer starting to work with SQL Server and Access
projects. My SQL Server database has a 100,000 row table, and I
find that loading it behind a form is slow. Can you give me some
strategies for making the data loading process go faster? |
| |
Forms can be bound or unbound. If they are unbound, they can be
bound to a little data or a lot of data. There is a related
issue. How fast do your queries go? You should always have
a primary key, and you should consider additional indices to
speed query performance. Another way to make queries go faster
is to return less data. You can achieve this by returning fewer
rows and columns (don't do SELECT * FROM table). You can reduce
query time by reducing the number of rows returned, the number of
columns returned, or both.
Given these considerations, your challenges as database developer are
to design the fastest queries and to have the smallest amount of
data behind a form that can still get the job done. It is often
convenient to have all the data behind a form, but this may not be
practical (especially when you are dealing with 100,000 or more
records). It is typically true that the less data behind a form,
the more programming you have to do. On the other hand, the
faster the form works. What's a developer supposed to do?
Explain the tradeoffs to the client and have the form go as fast as
the client is willing to pay for?
|
|
|
I've
started studying XML (data is cross-platform; text files). Recently,
I read that one method of XML web publishing can be accomplished
by simply expanding the SQL "SELECT" statement to read
"SELECT ... FOR XML"(with some options); thus, avoiding scripts
altogether. I thought that was wild. I haven't seen it done yet, but I
wondered whether this statement could be generated from Access. |
| |
Access
does not support the "For XML" clause in a SELECT statement.
However, a straightforward way in Access 2002 of writing XML based on
Access data sources exists with the ExportXML method for the Access
application object. See my Programming
Microsoft Access Version 2002 book (pages 1003-1015) for more
in-depth coverage of XML with Access 2002.
In addition, you can output XML from any ADO recordset. The format is
a little obsolete, but it is XML. To write XML based on an ADO recordset
use the Save method for the recordset object with an adPersistXML argument.
My previous page reference illustrates the detailed syntax. The main advantage of
this approach is that it does not require Access 2002 as does the
ExportXML method.
My latest book, Programming
Microsoft SQL Server 2000 with Microsoft Visual Basic .NET, includes
extensive coverage of the "For XML" clause in T-SQL. See
particularly, pages 213-222. In addition, there three chapters
that bear directly or indirectly on the use of XML with SQL Server. |
|
|
On
pages 478-479, the Programming Microsoft Access 2000 book describes
making a connection to the pubs database. I can't get the
instructions to work. |
| |
Your
observation is correct. In order to get the instructions to work,
you need the pubs database, which ships exclusively with commercial
versions of SQL Server. The MSDE product that ships with Office is
not a commercial version. The instructions will work if you have a
commercial version of SQL Server on your workstation. |
|
|
Can
you point me at some resources for the pros versus the cons of .mdb's
and .adp's? |
| |
There's
plenty of free content at the ProgrammingMSAccess.com. For example, an
excerpt from "Programming Microsoft Access Version 2002"
includes a review of selected issues. My personal preference is
for .adp files. Since they work with a SQL Server database engine,
my applications automatically work with Microsoft's enterprise database
engine. As your applications grow in terms of size and number of
users, this will extend their life. |
|
|
I
developed on an Oracle driven platform and used an enumeration data type
to allow me to store multiple data type values in a single column.
I am looking for an equivalent in Access but am not having any luck. |
| |
SQL
Server 2000 supports a sql_variant data type that permits the storage of
multiple data types in a single column. Access 2002 permits you to
readily build solutions against SQL Server 2000. Also, Office XP
ships with a free desktop version of SQL Server 2000. Therefore,
you can use Access 2002 to store multiple data types in a single column. |
|
|
Can
you provide a resource with a full list of escape Chars to get round
reserved chars (ie & for ampersand) in XML / XSL? |
| |
Go
to the Special Characters topic in Books Online for SQL Server 2000. It
includes two sets of special characters: one for URL encoding and
another for XML. Between these two, you will find hex codes for &,
>, <, %, ?, and assorted other characters. |
|
|
I
created a database using DTS import/outport wizard. Can you can tell me
how to delete it. |
| |
Type
the following into Query Analyzer
USE master
DROP DATABASE databasename
where databasename is the name of the database that you created with
DTS. Then, run the script. |
|
|
I've
just moved a web app from using ADO and Access to using SQL Server,
there are some code differences which I can't find out about. For
example, I am using this line, and it gives me an error: strSQL="Insert
into mytable (mydate) values (#01/08/01#);" |
| |
On
your date problem try code like this:
insert into employees (firstname, lastname, birthdate) values('rick',
'dobson','9/9/1944')
As you migrate from Access to SQL Server, you will notice a wide
series of issues, such as differences in date delimiters and wildcard
parameters, that are not covered by the standard SQL Server literature.
In addition, there are other issues that will be new to Access
developers, such as stored procedures and triggers. In spite of these
differences, Access can make a powerful development tool for SQL Server
solutions. This is especially true if you decide to use Access projects,
which vastly simplify SQL Server development from Access. Use Professional
SQL Server Development with Access 2000 to learn about the
differences and new features as well as how Access projects can expedite
the creation of SQL Server solutions.
If you are using SQL Server 2000, then I urge you to consider Access
2002 to develop SQL Server solutions. This is because Access 2000
requires a couple of special patches to work with SQL Server 2000, but
Access 2002 works with SQL Server as it comes out of the box. In
addition, Access 2002 gives you better control over SQL Server. For
example, you can create your own user-defined functions in SQL Server.
My new book Programming Microsoft Access Version 2002, which will be
available in a couple of weeks, includes two chapters (over 200 pages)
on developing solutions for SQL Server 2000 with Access 2002. |
|
|
I would like to script adding SQL Server Authentication users to a
database server and script giving them permission. I will create one system
account "mysa" and use this from many applications. Does anybody know if this
is possible. I am willing to use SQL script or VBScript. Also, is this possible when using NT
Authentication? |
| |
See
http://www.sqlmag.com/Articles/Index.cfm?ArticleID=16559 for a discussion of scripting security using SQL-DMO with VBA. Since VBA is close to VBScript, this may be what you are looking for (or at least give you some food for thought about scripting security). Actually, that article is the fourth in a four-part series on SQL Server security. Links for the other articles are available at
http://www.sqlmag.com/Articles/Index.cfm?AuthorID=536.
You can create logins for Windows users and Windows groups. In Books Online for SQL Server 2000, look up Type Property (Login) for more detail on how to specify a login for a standard SQL Server login, a Windows user, or a Window group. |
|
|
I
have a few MSDE installations that I want to manage. I understand that I
should load the SQL Client tools on the server to manage it (can't
connect remotely because it uses Named Pipes). During the installation
of the client tools though, it wants to install a version of the MDAC -
which I know is older than the version installed because these
servers have MDAC 2.7 B2 installed (these are .Net beta servers).
How can I manage the local MSDE instances without breaking
anything on the server? Is there another tool that can be used other
than the SQL Client tools? If not, is there a way to install the SQL
Client tools without touching the existing MDAC? |
| |
You
can register a MSDE server running on a Win 98 SE box in Enterprise Manager for SQL
Server 2K. It is necessary to start the DTC on the MSDE server, but you
can do this remotely from SQL Server 2K. After registering the MSDE
server, you can treat it like any other server in the group.
Second, if this solution does not work for any reason, consider using
SQL-DMO to programmatically manage the remote server. As you may know,
SQL-DMO is a COM object that you can reference from VB or even the VBE
window of Access 2000/2002. After the reference, you can make a
connection to a server and administer it programmatically. This approach
is very flexible since you can expose just the functionality that you
prefer. I wrote a four-part series on this topic for SQL Server
Magazine, and my upcoming book titled Programming Microsoft Access
Version 2002 includes even more advanced coverage and samples on this
topic.
There are others that can assist you as well (for example, you can
program T-SQL with ADO). |
|
|
In
appendix C of your Professional SQL Server Development with Access 2000
book, there was a cool sample of attaching database files.
However, it requires a reference to the Microsoft SQLDMO Object Library,
and I cannot find the reference on my computer. Why is this?
Are there any alternatives ways to attach database files to a different
server? |
| |
In
order for the Microsoft SQLDMO Object Library reference to exist in the
Available references list, you must have a version of SQL Server or MSDE
installed on your computer. The library installs automatically when you
install either MSDE or SQL Server. MSDE is free with Office 2000, and my
book describes how to install it. From your problem description, it
sounds like you may not have a version of MSDE installed on your
computer.
This book covers two other
approaches to copying database files between servers. For example,
Appendix C describes a graphical technique for attaching a database file
to a server. In addition, pages 51-52 describe and illustrate how to use
the sp_attach_db system stored procedure. This command does not depend
on the installation of the Microsoft SQLDMO Object Library. It is plain
T-SQL, and you can use anywhere you can use T-SQL. |
|
|
I
have Access 2000 but not SQLServer. I want to learn as much as I
can about SQLServer and SQLServer development without having to purchase
it (at least right now). Is this realistic? If so, which book(s) do you
recommend? |
| |
I
can help you on both fronts -- namely, learning about SQL Server without
buying it and a book to expedite your learning process.
First, you should understand that MSDE, the Microsoft Data Engine,
ships with all versions of Office 2000 that include Access 2000. MSDE
uses SQL Server technology. You program like you do SQL Server, but it
is available for free as part of Office 2000. Therefore, if you have
Access 2000, you have MSDE that you can use to learn about SQL Server.
Second, my book Professional
SQL Server Development with Access 2000 has folks like you as one of
its prime targets. The book will explain the special steps for
installing MSDE. It will also describe the Access project interface for
directly manipulating SQL Server databases, including those in MSDE,
with Access 2000. You will also learn programming techniques for using
T-SQL and SQL-DMO for working with SQL Server. There are separate
chapters on techniques for creating tables, views, and stored procedures
as well as SQL Sever security and uploading data and schema from Access
to SQL Server. Other chapters drill down on using Access forms, reports,
and data access pages with SQL Server. |
|
|
Please
tell me how many users at a time Microsoft Access accepts. I have
heard 255 but in reality is this real, or at-least in ASP. Is
ms Fox-Pro better than access for web development? |
| |
Let
me answer the second question first. Microsoft Access is a great
solution development environment. It is superior to Fox Pro and
many other databases for a wide range of situations because of the
combination of ease of use plus raw power that it delivers.
The figure of 255 users is for the upper limit for the number of
users over a LAN. In fact, the consensus among many Access developers is
that the actual upper limit is more like 20 users in practice. This
number can vary substantially depending on what your users are doing
with the database, the size of the database, how you program their
access (for example, fire-hose cursors are faster than keyset cursors),
and the clock speed of your processor.
Regarding web work, I am not sure if you are talking about intranet
or Internet connections. If you plan an intranet deployment, Data Access
Pages (DAP) are a very attractive developing framework. It is graphical
and fast to develop with for simple applications. If you plan an
Internet deployment, then I recommend Active Server Pages as a
developing framework. This is a more flexible development environment
than the DAP environment, but you are likely to spend more time
developing code.
Regarding the number of users for web work, you have your choice of
using the Jet or MSDE database managers (unless, of course, you rather
move up to SQL Server, which you can also manage with Access). Jet is
the standard file/server database for Access. MSDE is the free version
of SQL Server that ships with Access as part of Office. Microsoft
programmed MSDE so that performance starts to degrade after around 5
concurrent users, but I have heard folks report satisfactory performance
with as many as 40 users. Again, I think it depends on what users do
with the database, how you program their access, and the power of the
computers. For example, MSDE supports up to 2 concurrent processors. Jet
supports just one processor, but it will run faster on a processor with
a higher clock speed.
You can develop web applications for either database manager with
Access and DAPs or ASPs. I also recommend using a Microsoft web server,
such as IIS or Personal Web Manager. The upper limit of the number of
users your solution can serve will depend on all the choices you make.
Remember, however, that web connections are stateless. This means that
your web clients can put a lighter load on a database than your LAN
clients. Therefore, your upper limit for the number of users is higher
with a web solution than a LAN solution. In fact, you could achieve a
dramatically higher number of users with a web-based solution.
My Professional SQL Server
Development with Access 2000 book includes three chapters on web
development. One focuses on publishing datasheets to a web site, and it
includes some introductory samples on ASP development. The second
chapter drills down on ASP development for custom forms. The third
chapter focuses on DAPs and related technologies, such as PivotLists.
While this book focuses on SQL Server and MSDE, the web techniques will
work with a Jet database manager as well. In addition, I have another
book titled Programming Microsoft
Access 2000. This book includes a web development chapter that
highlights web development solutions for the Jet database manager. |
|
|
My sql statement is
like this:
strSQL =
"CREATE TABLE Janet ([ID] LONG PRIMARY KEY, [NAME]
VARCHAR(50));"
objRS.Open strSQL,
objConn
When I try to insert
data with this code:
strSQL =
"INSERT INTO Janet([NAME]) VALUES('Smith');"
objRS.Open strSQL,
objConn
I get a message that
says:
primary key [ID]
can't contain null value.
I thought primary
key field was autonumbered automatically each time I
inserted a new
record. Why does it say that I can't have a null value for
[ID]?
|
| |
Change
the LONG after [ID] in the CREATE TABLE statement to INT IDENTITY. INT
is the SQL Server name for a Long data type in Access, and IDENTITY is
the keyword in SQL Server for denoting an AutoNumber field.
My book, Professional SQL Server
Development with Access 2000, includes a table summarizing
comparable data type names from Access and SQL Server. It also includes
how to use the IDENTITY property in different context, including how to
turn it off so you can sometimes write a value into a column with the
IDENTITY property. I mention the latter capability of the IDENTITY
property to point out that it is not exactly the same as an AutoNumber
field.
Since you said you were using Access 2000, I want to remind you that
you can create tables graphically, using either the visual Table
Designer or a Database Diagram. Any SQL Server database can have
multiple database diagrams. They are kind of like the Relationship
window in Access on steroids. My book
contains a whole chapter on how to use database diagrams from the
Database window in an Access project. |
|
|
I
want to programmatically list the columns of any SQL Server that I
specify. How do I accomplish this task? |
| |
sp_columns
is a built-in stored procedure that performs your objective from Query
Analyzer. You can also use it from Access Projects. My online article
titled "Using Stored Procedures with Access Projects" includes
more commentary on sp_columns and shows how to use. Its URL is http://www.sqlmag.com/Articles/Index.cfm?ArticleID=8039.
You can additionally use ADO to perform your task. Here the trick is
to point a recordset object at the table. Then, enumerate the Fields
collection of the recordset and print name property of each field. This
will name each column in the table to which the recordset points.
Look at the book excerpt from Programming
Microsoft Access 2000 for more specific help on how to accomplish
this task. Although the samples pertain to a Jet database, ADO is
universal at the level of recordsets and fields.
A third way to solve your problem uses SQL-DMO. SQL-DMO exposes a COM
interface for administering SQL Server. Therefore, any programmer that
can connect to a COM object can programmatically administer SQL-DMO from
their favorite programming language, such as VBA in Access or
stand-alone VB. My book, Professional
SQL Server Development with Access 2000, on pages 117-118 includes a
specific code sample that demonstrates how to enumerate the columns of a
table with SQL-DMO. |
|
|
I
want to manage SQL Server databases graphically with database diagrams,
and I particularly want to add a new table with a database
diagram. How do I learn these tasks? |
| |
Choose Diagram > New Table from the Design view menu bar
for a diagram. This will allow you to start the design of a new table from a blank diagram or
a diagram of existing tables.
Chapter 4 in my book, Professional SQL Server Development with Access
2000,
drills down on how to use database diagrams for SQL Server databases from
Access 2000. Among the topics it addresses are:
* adding and dropping existing tables
* creating new tables
* updating existing tables
* designating or deleting constraints for tables
* assigning or removing indexes from a table
* declaring and dropping referential integrity |
|
|
How
do I could a parameter query in SQL Server? |
| |
Did
you know that there was a Northwind database for SQL Server? In
fact, there are two, and one of these ships with Office 2000. Its
name is NorthwindCS. In any event, you can create a parameter
query with a stored procedure. The sample NorthwindCS database has the
code, which I repeat below for your convenience.
Alter Procedure [Sales by Year]
@Beginning_Date datetime,
@Ending_Date datetime
AS
SELECT Orders.ShippedDate, Orders.OrderID,
"Order Subtotals".Subtotal, DATENAME(yy,ShippedDate) AS Year
FROM Orders
INNER JOIN "Order Subtotals" ON
Orders.OrderID = "Order Subtotals".OrderID
WHERE Orders.ShippedDate Is Not Null And
Orders.ShippedDate Between @Beginning_Date And @Ending_Date
|
|
|
Where
can I get Microsoft SQL Server 2000 for free? |
| |
Microsoft
is not in the habit of giving its software away unless it is for a
worthy cause. High on their worthy list is giving you a chance to
learn the product so you can decide if it is right for you.
Therefore, Microsoft offers a free trial version of SQL Server 2000 with
a set of instructional materials that you can download. Go to http://www.microsoft.com/sql/productinfo/evaluate.htm
to learn more about this great deal! |
|
|
I
don't have any good references on how to accomplish replication between
Sql Server and MSDE. Can you point me to some good references? There
seems to be lots of references that talk about Jet and Sql Server, but
none with MSDE. |
| |
Think
of MSDE as a near equal to SQL Server 7 that can participate in merge
and transactional replication with SQL Server as a subscriber.
Therefore, look up sources for SQL Server 7 replication and think of
MSDE as the client. Books Online is always a good starting place for
this kind of thing. Remember that you can download Books Online
for SQL Server for free from the Microsoft web site at http://www.microsoft.com/SQL/techinfo/productdoc/70/books.asp. |
|
|
Can
I use a stored procedure to obtain information for an Access form? |
| |
There
are a couple of ways to go. First, bind the form to a table. Have the
form update values in the table. Then, have the stored proc work with
the updated values in the table. Second, use an unbound form and a
stored proc that takes parameters. Set the stored proc's parameters
equal to form's field values. Then, invoke the stored proc. |
|
|
How
do I set SQL Server Security from an Access project? |
| |
One
way to start doing this is by choosing Tools, Security, Database
Security from the Windows database menu. Start by creating a new
login. SQL Server logins control access to a SQL Server database
server, but not necessarily any databases on the server. Next,
create a new SQL Server user account that corresponds to the login for
each database that you want the login to have access. Finally,
assign the new user to one or more of the fixed Datable roles. You
can replace this last step with creating a new user-defined role and
assigning custom permissions to it. |
|
|
Books
Online does not ship with Office 2000. Is there any way that I can
get it for free? |
| |
Books
Online is the definitive Microsoft resource for SQL Server. MSDE
does not include a version of it. You can download a copy of Books
Online compatible with the MSDE in Office 2000 from http://www.microsoft.com/SQL/productinfo/70books.htm. |
|
|
How many processors will MSDE support? |
| |
MSDE supports up to 2 processors on an NT box, and it
supports 1 processor on a Win 9x box. |
|
|
Is there a license limit on the number of concurrent
MSDE users? |
| |
There is no limitation (via licensing or otherwise) on the number of users that connect to
MSDE. However, Microsoft asserts it is "tuned" for 5-6 concurrent connections. Within the context of Access projects, a
connection equals a session. Generally, each user will have just
one session, but there is nothing to stop an individual from opening
concurrent, multiple sessions. Anecdotal information suggests that
MSDE can support many more than 5 concurrent connections for some
applications. Sign the Guest Register and tell your story about
MSDE capacity in the comments section. |
|
|
How do I find out the names of the diagrams in my SQL
Server or MSDE database? |
| |
Run this query to generate a list of the diagram names in
a database:
SELECT *
FROM dtproperties
WHERE (property = 'DtgSchemaNAME') |
|
|
How do I copy a database from one SQL Server to another
(including an MSDE server)? |
| |
There are at least a couple of ways to tackle this problem
programmatically. First, you can use Transact-SQL in a stored
procedure. Second, you can use SQL-DMO objects in a VBA
procedure. You can find out about either through the SQL Server
Books Online resource.
No matter which of the above two approaches, you will want to learn
about the following system stored procedures: sp_detach_db, sp_attach_db,
and sp_attach_single_file_db. |
|
|
How do I manually copy a database from one SQL Server to another
(including an MSDE server)? |
| |
The way that I like the most uses the Data Link Properties
dialog that you can open with the File > Connections command. Copy your database and log files to disk. If you control
the server, shut it down to do this manually and then re-start your
server. Otherwise, you have to use something like the file system
object. When you get to the MSDE computer (maybe it is at home), copy
the database and log files to your MSDE server. Open an .adp file
and connect it to the copied files using the Data Link Properties
dialog. Select the radio button for attaching a database file and
browse to the .mdf file for your copied database. |
|
|
I cannot get milliseconds to appear for datetime values
in stored procedures that I display from the Access 2000 stored
procedure template? How can I include milliseconds in my results
from Access 2000. |
| |
The inability of Access 2000 to return milliseconds from
stored procedures that run in the Access stored procedure template is a
bug. For example, milliseconds do appear when appropriate from
stored procedures that you run from Query Analyzer. One
work-around to the problem is to capture milliseconds along with other
time units with the DATEPART function. Then, compose your own
string representation for time. |
|
|
How can I obtain the developer edition of SQL Server
7.0 for FREE? |
| |
If you have a license for Microsoft Office 2000 Developer
Edition, you may not know that you can obtain a copy of the SQL Server
7.0 developer edition with the Access Worflow Designer (AWD). You
can learn more about the AWD and how to get your copy of the developer
version of SQL Server 7.0 by clicking here. |
|
|
What's a system stored procedure? |
| |
This is a built-in Transact-SQL program that typically
performs some administrative task with SQL Server and MSDE. The
preceding answer references three system stored procedures. There
are literally scores of other system stored procedures. System
stored procedures start with an sp_ or an xp_ prefix. You invoke
them from an Access project stored procedure template by replacing text
after the As keyword with EXEC followed by the name of the system stored
procedure and any relevant arguments. For
example, EXEC sp_columns Customers can provide meta about the columns in
the NorthwindCS database. |
|
|
Will NorthwindCS install automatically if I already
installed MSDE? |
| |
The NorthwindCS front-end is copied to your machine when you choose to install the Access samples. This process is totally independent of MSDE being on the box or not.
If MSDE is running on your machine when you open the NorthwindCS ADP for the first time, you are given the opportunity to install the back-end database. If you choose to install it, scripts that generate the database, tables and data run. If you are not running
MSDE, you are prompted for the location of a SQL Server so that the database can be created there. |
|
|
Do I have to use CREATE PROCEDURE to create a new
stored procedure? |
| |
No. You can use the Alter Procedure statement inside
of an Access project. |
|
|
When I perform division between two integer quantities
with SQL Server, the result is an integer quantity that truncates the
fractional values in the quotient. This does not happen with
Access. How do I get the fractional part of a quotient when
dividing one integer into another in SQL Server? |
| |
Apply a Cast function to the numerator and denominator
that transforms each from an integer quantity to a floating
quantity. For example, your SELECT statement can have an
expression like this CAST(SUM(quantity) AS FLOAT)/CAST(COUNT(quantity)
AS FLOAT). |
|
|
I have used the ADP data wizard many times, but I
always had my computer connected. Recently, I tried to create a
database without having my computer connected. The wizard failed
with a message about network connectivity. Is the database wizard
for adp files with MSDE not to work unless you are connected? |
| |
When using the database wizard to create a new .ADP file
(whether to an existing or a new database), you must have a valid
network connection to either a SQL Server backend or the SQLServer service
(MSDE
or SQL Server 7.0) on your local machine. |
|
|
A Win 9x machine in my office fails to enable MSDE as a
server on a local network, but MSDE acts as a server from other
computers in the office network. The computer that does not expose
MSDE as a server performs file sharing with the rest of the
network. What could cause this? |
| |
One cause of this problem can be the Browse Master setting
for File and printer sharing on Microsoft networks. Right click
your Network Neighborhood icon and choose Properties. Then, select
File and printer sharing on Microsoft networks and click Properties to
open a dialog containing the property setting. The default setting
is Automatic, but it should be Enabled for this and selected other
functions. |
|
|
I'm developing an application with SQL Server as a back
end using triggers. How do I deploy this to my customer with MSDE?
(The customer isn't ready to buy SQL Server.) |
| |
Go to http://msdn.microsoft.com/library/techart/msdedeploy.htm
for a white paper on deploying Access solutions and the Office
2000 Developer Edition re-distributable MSDE via its Package and
Deployment wizard. If you do any work with Visual Studio, you may
also find some value in http://msdn.microsoft.com/vstudio/msde/deploying.asp.
Additionally, Rick Dobson has several articles either out or forthcoming
on developing Access 2000 solutions with SQL Server/MSDE databases in
SQL Server Magazine, Microsoft Office & VBA Developer, and Visual
Basic Programmer's Journal. In addition, the Programming
Microsoft Access 2000 book has a chapter on the topic. |
|
|
I am not able to install the sample database from Rick Dobson's MSDE article in the Visual Basic
Programmer's Journal? |
| |
Two common factors emerged as reasons for the installation
program associated with the article not working. First, your VBE
project requires a reference to the SQL-DMO object library. Use
the Tools > Reference command to create the reference. Second,
you are running an obsolete version of NT 4. The sample
application requires Service Pack 4 or greater. If you have an
older version, the sample will not work. |
|
|
After having MSDE work for months, I was no longer able
to add tables, or other database objects to Access projects. What
can I do to get my MSDE back? |
| |
Actually, the problem need not be with MSDE at all.
See if you can connect and create tables for the MSDE databases from
another computer with a different copy of Microsoft Office. If so,
your problem may be with Office 2000 instead of MSDE. If you
have already re-installed MSDE and the problem still persist, this is
particularly likely.
Another site visitor reported success with your problem by running
ScanDisk. Select automatically fix errors before starting the
program.
By the way, you should be careful about re-installing MSDE since the
version of the MSDE database engine will not by default know about your
databases from the prior version. If you have a version of the
master database from the former database version, you can try that to
see if it lets you recover your databases from the earlier
version. Otherwise, there are several more involved
techniques. One of these is discussed on pages 480-481 of the
Programming Microsoft Access 2000 book. Go to the About the
Book link on the Home Page for this site to learn more about the book. |