Showing posts with label access. Show all posts
Showing posts with label access. Show all posts

Friday, March 30, 2012

newbie question on TableDefs

I am swtiching from access/Jet to msde, and cannot figure out how to
retrieve the tabledefs from msde

This is how I did it with Jet:

Dim T As TableDef, D As Database, dbpath As String
dbpath = Application.CurrentProject.Path & "\data.mdb"
Set D = DBEngine.Workspaces(0).OpenDatabase(dbpath)
Set T = D.TableDefs(symbolName)

What is the equiavlent for msde/mssql?

MANY Thanks in adv."Ernesto" <tsh@.mathematicuslabs.com> wrote in message
news:0vWdnQohvoduenfdRVn-uA@.speakeasy.net...
> I am swtiching from access/Jet to msde, and cannot figure out how to
> retrieve the tabledefs from msde
> This is how I did it with Jet:
> Dim T As TableDef, D As Database, dbpath As String
> dbpath = Application.CurrentProject.Path & "\data.mdb"
> Set D = DBEngine.Workspaces(0).OpenDatabase(dbpath)
> Set T = D.TableDefs(symbolName)
> What is the equiavlent for msde/mssql?
> MANY Thanks in adv.

I'm not sure exactly what information you need, but one or both of these may
be what you're looking for:

-- List of table names in the current database
exec sp_tables @.table_type = '''table'''

-- Structure of an individual table
exec sp_help MyTable

If that's not useful, then you might want to give some more details -
personally, I don't know what a tabledef is in Access. Also, check out the
"System Stored Procedures" and "Metadata Functions" topics in Books Online,
as there are many ways to retrieve different items of metadata. Finally, if
you're interested in using a COM interface, then SQLDMO can retrieve and
manipulate objects in MSSQL.

Simon|||Simon,
Thanks very much for your reply.
TableDefs are simply the design of the tables.
So it seems that sp_Help does this, as you had guessed I needed.

I looked this up in a few places but stilll it is not clear how I should use
it.
e.g.
http://msdn.microsoft.com/library/d...p_help_304w.asp

says that it returns a "result set", but what is a "result set"? same as a
record set?
This shows how uninformed I am. But I have not found the syntax or how to
look at this result set.

Furthermore, the site says that sp_help works only on the current DB. How
can I specify the relevant database?

More of the code I have to work with is:

dbpath = Application.CurrentProject.Path & "\HOG.data.mdb"
'specify the db
Set D = DBEngine.Workspaces(0).OpenDatabase(dbpath) 'set the
db
Set T = D.TableDefs(symbolName) 'get the definition os
the table named symbolName

For i = 0 To T.Fields.Count - 1 ' look thriogh its fields to
see if "tdate" is one of them
If UCase(T.Fields(i).Name) = "TDATE" Then
isTimeSeries = True
...

If you have any further hints, I will be obliged.

E|||Ernesto (tsh@.mathematicuslabs.com) writes:
> says that it returns a "result set", but what is a "result set"? same as a
> record set?

Yes, "result set" is the proper terminology when you are talking databases.
(Just like "records" are called "rows" and "fields" are called "columns".

> This shows how uninformed I am. But I have not found the syntax or how to
> look at this result set.

You just say:

exec sp_help tbl

The "exec" keyword is optional if this is all you say, but if you are
looking at two, you need it at least for the second call to sp_help.

You run this command from Query Analyzer.

> Furthermore, the site says that sp_help works only on the current DB. How
> can I specify the relevant database?

You can say:

exec some_other_db..sp_help tbl

This applies to all system procedures (those that start with sp_).

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||> You run this command from Query Analyzer.
> You can say:
> exec some_other_db..sp_help tbl
Thanks VERY much for following up.

One more thing, With apologies in advance if this is a stupid question:
I was asking about how to do it from VBA, instead of the Query analyzer.
Where/how will the result set be stored so that the code can inspect it.

TX|||Ernesto (tsh@.mathematicuslabs.com) writes:
> One more thing, With apologies in advance if this is a stupid question:
> I was asking about how to do it from VBA, instead of the Query analyzer.
> Where/how will the result set be stored so that the code can inspect it.

I would guess that you could use ADO to access the database and execute
the commands and get them in record sets.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||Thanks,
I found out that this is a direct substitute:

Set Rst = New ADODB.Recordset
Rst.Open "SELECT top 1 * FROM " & symbolName, ConnString

For I = 0 To Rst.Fields.Count - 1
If UCase(Rst.Fields(I).Name) = "TDATE" Then
isTimeSeries = True
...

Wednesday, March 28, 2012

Newbie question about importing db into SQL Server

Relatively new to SQL, will be using it as the engine for a dynamic website...I have a database in Access that is the foundation for this site -- it's pretty simple, just a few tables with relationships established & a couple of queries.

Is there a tool that can migrate this Access db into SQL, or should I just reconstruct it? Been looking around for some tech notes and have been unsuccessful so far. Thanks in advance! -ValerieI'd suggest the Access Upsizing Wizard (http://support.microsoft.com/default.aspx?scid=kb;en-us;330468).

-PatP|||Thanks! ...you'd think that would pop up in Access Help, you know? Harumph. -vsql

Monday, March 26, 2012

Newbie Question - Edit data on SQL Server using Data access pages

I have been and SQL administrator for about 6 hours now. I grabbed a couple
books and have been doing searches online and reading through some MSDN
online stuff. Having never seen SQL but having done some Access it wasn't
too hard to get a database set up on the server.
I managed to import an old access database with tables into the SQL database
on the server. Easy enough. I then managed to set up a new Access Project
on a local machine pointing at the server and connect to the database quite
easily.
Then I built an form based on the primary table. Easy enough. I had to go
into form properties and enable edit so that the form would open. Otherwise
it just opened as a blank form page with no fields.
I can also build data access pages that display all the data in the database
which is wonderful and I'm really starting to see how powerful and wonderful
SQL is going to be.
Only problem is everything I do creates read only. I can do a data access
page, a form or a table but even with edit enabled I only get read only
access to the data. Any attempts to modify data results in the following
message in the taskbar.
On data access page: No message just don't allow edits or typing.
On Form in access: Field "XXX" is based on an expression and cant be
edited.
On Table view: The recordset is not updatable.
I'm sure once I spend a few more hours beating around I'll figure this out
and I'm sure its just because of my naivety in all things SQL but I was
hoping someone would have a quick pointer to get me back on the development
track.
Thanks again for all your help.
Doc
The SQL server user account accessing the SQL server from access has to
have write access.
and more importantly the table needs to have a unique index else you will
not be able to edit the recordset/Table in access.
|||Check if the table has a primary key, if not, create the pk and them relink
the tables.
AMB
"Donald Watson" wrote:

> I have been and SQL administrator for about 6 hours now. I grabbed a couple
> books and have been doing searches online and reading through some MSDN
> online stuff. Having never seen SQL but having done some Access it wasn't
> too hard to get a database set up on the server.
> I managed to import an old access database with tables into the SQL database
> on the server. Easy enough. I then managed to set up a new Access Project
> on a local machine pointing at the server and connect to the database quite
> easily.
> Then I built an form based on the primary table. Easy enough. I had to go
> into form properties and enable edit so that the form would open. Otherwise
> it just opened as a blank form page with no fields.
> I can also build data access pages that display all the data in the database
> which is wonderful and I'm really starting to see how powerful and wonderful
> SQL is going to be.
> Only problem is everything I do creates read only. I can do a data access
> page, a form or a table but even with edit enabled I only get read only
> access to the data. Any attempts to modify data results in the following
> message in the taskbar.
> On data access page: No message just don't allow edits or typing.
> On Form in access: Field "XXX" is based on an expression and cant be
> edited.
> On Table view: The recordset is not updatable.
> I'm sure once I spend a few more hours beating around I'll figure this out
> and I'm sure its just because of my naivety in all things SQL but I was
> hoping someone would have a quick pointer to get me back on the development
> track.
> Thanks again for all your help.
> Doc
>
>
|||It was the missing primary key.
Now I can develop to my hearts content.
Thanks so much for the fast response.
Doc
sql

Newbie Question - Edit data on SQL Server using Data access pages

I have been and SQL administrator for about 6 hours now. I grabbed a couple
books and have been doing searches online and reading through some MSDN
online stuff. Having never seen SQL but having done some Access it wasn't
too hard to get a database set up on the server.
I managed to import an old access database with tables into the SQL database
on the server. Easy enough. I then managed to set up a new Access Project
on a local machine pointing at the server and connect to the database quite
easily.
Then I built an form based on the primary table. Easy enough. I had to go
into form properties and enable edit so that the form would open. Otherwise
it just opened as a blank form page with no fields.
I can also build data access pages that display all the data in the database
which is wonderful and I'm really starting to see how powerful and wonderful
SQL is going to be.
Only problem is everything I do creates read only. I can do a data access
page, a form or a table but even with edit enabled I only get read only
access to the data. Any attempts to modify data results in the following
message in the taskbar.
On data access page: No message just don't allow edits or typing.
On Form in access: Field "XXX" is based on an expression and cant be
edited.
On Table view: The recordset is not updatable.
I'm sure once I spend a few more hours beating around I'll figure this out
and I'm sure its just because of my naivety in all things SQL but I was
hoping someone would have a quick pointer to get me back on the development
track.
Thanks again for all your help.
DocThe SQL server user account accessing the SQL server from access has to
have write access.
and more importantly the table needs to have a unique index else you will
not be able to edit the recordset/Table in access.|||Check if the table has a primary key, if not, create the pk and them relink
the tables.
AMB
"Donald Watson" wrote:
> I have been and SQL administrator for about 6 hours now. I grabbed a couple
> books and have been doing searches online and reading through some MSDN
> online stuff. Having never seen SQL but having done some Access it wasn't
> too hard to get a database set up on the server.
> I managed to import an old access database with tables into the SQL database
> on the server. Easy enough. I then managed to set up a new Access Project
> on a local machine pointing at the server and connect to the database quite
> easily.
> Then I built an form based on the primary table. Easy enough. I had to go
> into form properties and enable edit so that the form would open. Otherwise
> it just opened as a blank form page with no fields.
> I can also build data access pages that display all the data in the database
> which is wonderful and I'm really starting to see how powerful and wonderful
> SQL is going to be.
> Only problem is everything I do creates read only. I can do a data access
> page, a form or a table but even with edit enabled I only get read only
> access to the data. Any attempts to modify data results in the following
> message in the taskbar.
> On data access page: No message just don't allow edits or typing.
> On Form in access: Field "XXX" is based on an expression and cant be
> edited.
> On Table view: The recordset is not updatable.
> I'm sure once I spend a few more hours beating around I'll figure this out
> and I'm sure its just because of my naivety in all things SQL but I was
> hoping someone would have a quick pointer to get me back on the development
> track.
> Thanks again for all your help.
> Doc
>
>|||It was the missing primary key.
Now I can develop to my hearts content.
Thanks so much for the fast response.
Doc

Newbie Question - Edit data on SQL Server using Data access pages

I have been and SQL administrator for about 6 hours now. I grabbed a couple
books and have been doing searches online and reading through some MSDN
online stuff. Having never seen SQL but having done some Access it wasn't
too hard to get a database set up on the server.
I managed to import an old access database with tables into the SQL database
on the server. Easy enough. I then managed to set up a new Access Project
on a local machine pointing at the server and connect to the database quite
easily.
Then I built an form based on the primary table. Easy enough. I had to go
into form properties and enable edit so that the form would open. Otherwise
it just opened as a blank form page with no fields.
I can also build data access pages that display all the data in the database
which is wonderful and I'm really starting to see how powerful and wonderful
SQL is going to be.
Only problem is everything I do creates read only. I can do a data access
page, a form or a table but even with edit enabled I only get read only
access to the data. Any attempts to modify data results in the following
message in the taskbar.
On data access page: No message just don't allow edits or typing.
On Form in access: Field "XXX" is based on an expression and cant be
edited.
On Table view: The recordset is not updatable.
I'm sure once I spend a few more hours beating around I'll figure this out
and I'm sure its just because of my naivety in all things SQL but I was
hoping someone would have a quick pointer to get me back on the development
track.
Thanks again for all your help.
DocThe SQL server user account accessing the SQL server from access has to
have write access.
and more importantly the table needs to have a unique index else you will
not be able to edit the recordset/Table in access.|||Check if the table has a primary key, if not, create the pk and them relink
the tables.
AMB
"Donald Watson" wrote:

> I have been and SQL administrator for about 6 hours now. I grabbed a coup
le
> books and have been doing searches online and reading through some MSDN
> online stuff. Having never seen SQL but having done some Access it wasn't
> too hard to get a database set up on the server.
> I managed to import an old access database with tables into the SQL databa
se
> on the server. Easy enough. I then managed to set up a new Access Projec
t
> on a local machine pointing at the server and connect to the database quit
e
> easily.
> Then I built an form based on the primary table. Easy enough. I had to g
o
> into form properties and enable edit so that the form would open. Otherwi
se
> it just opened as a blank form page with no fields.
> I can also build data access pages that display all the data in the databa
se
> which is wonderful and I'm really starting to see how powerful and wonderf
ul
> SQL is going to be.
> Only problem is everything I do creates read only. I can do a data access
> page, a form or a table but even with edit enabled I only get read only
> access to the data. Any attempts to modify data results in the following
> message in the taskbar.
> On data access page: No message just don't allow edits or typing.
> On Form in access: Field "XXX" is based on an expression and cant be
> edited.
> On Table view: The recordset is not updatable.
> I'm sure once I spend a few more hours beating around I'll figure this out
> and I'm sure its just because of my naivety in all things SQL but I was
> hoping someone would have a quick pointer to get me back on the developmen
t
> track.
> Thanks again for all your help.
> Doc
>
>|||It was the missing primary key.
Now I can develop to my hearts content.
Thanks so much for the fast response.
Doc

newbie question

i need to import data to excel from an sql db. the sql db is on a server,
excel will be on a remote computer. I'm quite happy to use access as an
intermediary if needed. i would also like to be able to write from excel to
sql is poss. although it this if tricky then i might well concentrate on
importing.

is any of this possible? if so is it hard? and can anyone point me to any
decent resources.

many thanksSearch for DTS packages in the SQL Books Online.
That should help you with what you want to do.

>i need to import data to excel from an sql db. the sql db is on a server,
> excel will be on a remote computer. I'm quite happy to use access as an
> intermediary if needed. i would also like to be able to write from excel
> to
> sql is poss. although it this if tricky then i might well concentrate on
> importing.
> is any of this possible? if so is it hard? and can anyone point me to any
> decent resources.|||Hi strawberry ,
U can try through import external data wizard from excel... Try it out.
Reg
Arijit|||For an alternative try this also

http://sqljunkies.com/WebLog/madhiv...7/27/16233.aspx

Madhivanansql

Friday, March 23, 2012

Newbie question

Hi All,
Is it possible to store tables (in general database objects) in SQL clients and access it from the SQL server?
Thanks
Eva
What are you trying to accomplish?
"Eva" <anonymous@.discussions.microsoft.com> wrote in message
news:2C3CCA52-4F57-409A-A331-4BFC9001F773@.microsoft.com...
> Hi All,
> Is it possible to store tables (in general database objects) in SQL
clients and access it from the SQL server?
> Thanks
>
|||I am designing a system in which there are about 50 computers containing region-wise data in tables. The tables in different regions have same structure but the data is region-specific. I need to transfer data from the tables in each region to a server. T
he problem is that I cannot have 50 SQL servers installations. I am looking for a work around. Can you suggest what should be done?
Thanks.
|||Eva
REPLICATION is what you need.
http://www.swynk.com/friends/achigrik/SetupMR.asp -- Setting Up Merge
Replication: A Step by Step Guide
http://www.mssqlcity.com/Articles/Replic/Replic.htm --Setting All
Replica (Step by step)
"Eva" <anonymous@.discussions.microsoft.com> wrote in message
news:F851497F-8B3B-4A3C-9482-97B5F0B75410@.microsoft.com...
> I am designing a system in which there are about 50 computers containing
region-wise data in tables. The tables in different regions have same
structure but the data is region-specific. I need to transfer data from the
tables in each region to a server. The problem is that I cannot have 50 SQL
servers installations. I am looking for a work around. Can you suggest what
should be done?
> Thanks.
|||Thanks Uri.
Yes, I could have the 50 computers set up as publishers and the server as a subscriber. But, what I understand of Publishers is that they have to be SQL servers!
|||Eva
How do they store the data? With text files?
Do they have an application (vb,c) which can connect to the main server?
"Eva" <anonymous@.discussions.microsoft.com> wrote in message
news:A89D4478-7858-493C-BD95-607A710004B3@.microsoft.com...
> Thanks Uri.
> Yes, I could have the 50 computers set up as publishers and the server as
a subscriber. But, what I understand of Publishers is that they have to be
SQL servers!
|||Data is stored in SQL tables. There is an application running on the server which accesses the tables in each of the 50 machines and fetches data from them!
|||Eva
Have you looked at DTS utility?
"Eva" <anonymous@.discussions.microsoft.com> wrote in message
news:4F67F94C-FFC2-4CB9-8ADB-2C66E427EA8C@.microsoft.com...
> Data is stored in SQL tables. There is an application running on the
server which accesses the tables in each of the 50 machines and fetches data
from them!
|||Merge replication would seem to fit the bill here. In merge the publisher/subscriber metaphore doesn't really hold, so in your case you'd have a central publisher and 50 subscribers. The subscribers don't need to be sql server - they could heterogenous eg
Access. I'm not sure from your post if you have the option of setting up the 50 subscriber's repositories. If so, then you could use MSDE.
Regards,
Paul Ibison
|||Eva,
When you say "SQL Tables" do you mean tables in a SQL Server database? Or is
it in another RDBMS?
Andrew C. Madsen
Information Architect
Harley-Davidson Motor Company
"Eva" <anonymous@.discussions.microsoft.com> wrote in message
news:4F67F94C-FFC2-4CB9-8ADB-2C66E427EA8C@.microsoft.com...
> Data is stored in SQL tables. There is an application running on the
server which accesses the tables in each of the 50 machines and fetches data
from them!

newbie question

Hello,
I am studying for my exam and I have a question. I have a sql server
in a domain and when the domain administrator tries to access it, he
has no problems!! But in the literature it says that a domain
administrator must be in a group that has access to the sql server in
order to connect to that server, which is not the case? Does it have
somehing to do with the builtin\administrator account?
Kind regards,
Nico
Yes. By default, a domain admin will get added to the local admin group when
the box joins the domain. That means a domain admin is part of the
builtin\admin group. Thus, he/she has full access to sqlserver.
"Nico" <nico.barbe@.mobiusREMOVEFORSPAM.be> wrote in message
news:eZXCly2jEHA.596@.TK2MSFTNGP11.phx.gbl...
> Hello,
> I am studying for my exam and I have a question. I have a sql server
> in a domain and when the domain administrator tries to access it, he
> has no problems!! But in the literature it says that a domain
> administrator must be in a group that has access to the sql server in
> order to connect to that server, which is not the case? Does it have
> somehing to do with the builtin\administrator account?
> Kind regards,
> Nico
|||By default, domain admin will be a member of local Administrators group
which essentially maps to BUILTIN\ADMIN account on SQL Server. However if
for some reason, someone has disabled or removed the builtin\admin account
from SQL, if the domain admin is part of another group on the server, and
if that other group is a registered user within SQL Server, then the domain
admin will have access to SQL through this other group even if
builtin\admin is disabled or removed.
Thank you for using Microsoft newsgroups.
Sincerely
Pankaj Agarwal
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.

Newbie question

Hi All,
Is it possible to store tables (in general database objects) in SQL clients
and access it from the SQL server?
ThanksEva
What are you trying to accomplish?
"Eva" <anonymous@.discussions.microsoft.com> wrote in message
news:2C3CCA52-4F57-409A-A331-4BFC9001F773@.microsoft.com...
> Hi All,
> Is it possible to store tables (in general database objects) in SQL
clients and access it from the SQL server?
> Thanks
>|||I am designing a system in which there are about 50 computers containing reg
ion-wise data in tables. The tables in different regions have same structure
but the data is region-specific. I need to transfer data from the tables in
each region to a server. T
he problem is that I cannot have 50 SQL servers installations. I am looking
for a work around. Can you suggest what should be done?
Thanks.|||Eva
REPLICATION is what you need.
http://www.swynk.com/friends/achigrik/SetupMR.asp -- Setting Up Merge
Replication: A Step by Step Guide
http://www.mssqlcity.com/Articles/Replic/Replic.htm --Setting All
Replica (Step by step)
"Eva" <anonymous@.discussions.microsoft.com> wrote in message
news:F851497F-8B3B-4A3C-9482-97B5F0B75410@.microsoft.com...
> I am designing a system in which there are about 50 computers containing
region-wise data in tables. The tables in different regions have same
structure but the data is region-specific. I need to transfer data from the
tables in each region to a server. The problem is that I cannot have 50 SQL
servers installations. I am looking for a work around. Can you suggest what
should be done?
> Thanks.|||Thanks Uri.
Yes, I could have the 50 computers set up as publishers and the server as a
subscriber. But, what I understand of Publishers is that they have to be SQL
servers!|||Eva
How do they store the data? With text files?
Do they have an application (vb,c) which can connect to the main server?
"Eva" <anonymous@.discussions.microsoft.com> wrote in message
news:A89D4478-7858-493C-BD95-607A710004B3@.microsoft.com...
> Thanks Uri.
> Yes, I could have the 50 computers set up as publishers and the server as
a subscriber. But, what I understand of Publishers is that they have to be
SQL servers!|||Data is stored in SQL tables. There is an application running on the server
which accesses the tables in each of the 50 machines and fetches data from t
hem!|||Eva
Have you looked at DTS utility?
"Eva" <anonymous@.discussions.microsoft.com> wrote in message
news:4F67F94C-FFC2-4CB9-8ADB-2C66E427EA8C@.microsoft.com...
> Data is stored in SQL tables. There is an application running on the
server which accesses the tables in each of the 50 machines and fetches data
from them!|||Merge replication would seem to fit the bill here. In merge the publisher/su
bscriber metaphore doesn't really hold, so in your case you'd have a central
publisher and 50 subscribers. The subscribers don't need to be sql server -
they could heterogenous eg
Access. I'm not sure from your post if you have the option of setting up the
50 subscriber's repositories. If so, then you could use MSDE.
Regards,
Paul Ibison|||Eva,
When you say "SQL Tables" do you mean tables in a SQL Server database? Or is
it in another RDBMS?
Andrew C. Madsen
Information Architect
Harley-Davidson Motor Company
"Eva" <anonymous@.discussions.microsoft.com> wrote in message
news:4F67F94C-FFC2-4CB9-8ADB-2C66E427EA8C@.microsoft.com...
> Data is stored in SQL tables. There is an application running on the
server which accesses the tables in each of the 50 machines and fetches data
from them!

newbie question

Hello,
I am studying for my exam and I have a question. I have a sql server
in a domain and when the domain administrator tries to access it, he
has no problems!! But in the literature it says that a domain
administrator must be in a group that has access to the sql server in
order to connect to that server, which is not the case? Does it have
somehing to do with the builtin\administrator account?
Kind regards,
NicoYes. By default, a domain admin will get added to the local admin group when
the box joins the domain. That means a domain admin is part of the
builtin\admin group. Thus, he/she has full access to sqlserver.
"Nico" <nico.barbe@.mobiusREMOVEFORSPAM.be> wrote in message
news:eZXCly2jEHA.596@.TK2MSFTNGP11.phx.gbl...
> Hello,
> I am studying for my exam and I have a question. I have a sql server
> in a domain and when the domain administrator tries to access it, he
> has no problems!! But in the literature it says that a domain
> administrator must be in a group that has access to the sql server in
> order to connect to that server, which is not the case? Does it have
> somehing to do with the builtin\administrator account?
> Kind regards,
> Nico|||By default, domain admin will be a member of local Administrators group
which essentially maps to BUILTIN\ADMIN account on SQL Server. However if
for some reason, someone has disabled or removed the builtin\admin account
from SQL, if the domain admin is part of another group on the server, and
if that other group is a registered user within SQL Server, then the domain
admin will have access to SQL through this other group even if
builtin\admin is disabled or removed.
Thank you for using Microsoft newsgroups.
Sincerely
Pankaj Agarwal
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.sql

newbie question

Hello,
I am studying for my exam and I have a question. I have a sql server
in a domain and when the domain administrator tries to access it, he
has no problems!! But in the literature it says that a domain
administrator must be in a group that has access to the sql server in
order to connect to that server, which is not the case? Does it have
somehing to do with the builtin\administrator account?
Kind regards,
NicoYes. By default, a domain admin will get added to the local admin group when
the box joins the domain. That means a domain admin is part of the
builtin\admin group. Thus, he/she has full access to sqlserver.
"Nico" <nico.barbe@.mobiusREMOVEFORSPAM.be> wrote in message
news:eZXCly2jEHA.596@.TK2MSFTNGP11.phx.gbl...
> Hello,
> I am studying for my exam and I have a question. I have a sql server
> in a domain and when the domain administrator tries to access it, he
> has no problems!! But in the literature it says that a domain
> administrator must be in a group that has access to the sql server in
> order to connect to that server, which is not the case? Does it have
> somehing to do with the builtin\administrator account?
> Kind regards,
> Nico|||By default, domain admin will be a member of local Administrators group
which essentially maps to BUILTIN\ADMIN account on SQL Server. However if
for some reason, someone has disabled or removed the builtin\admin account
from SQL, if the domain admin is part of another group on the server, and
if that other group is a registered user within SQL Server, then the domain
admin will have access to SQL through this other group even if
builtin\admin is disabled or removed.
Thank you for using Microsoft newsgroups.
Sincerely
Pankaj Agarwal
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.

newbie question

hi,
before i continue, let me first gave you an overview about
my status. i new to SQL Server before i'm just using MS
Access database. i have a win 98se, with 32mb memory! i
have a couple of simple app/addin and i wanted to use SQL
Server. first i bought SQL Server 2k enterprise edition,
but when i already installing the application if found out
i need to upgrade my hardware and software in order to use
it. but i don't have the money to it.
so my first question:
Is it possible to SQL Server2k enterprise edition on my
computer without upgrading my software and hardware:
so i bought the later version, SQL 7. at first glance on
its documentation i found some interesting text. SQL-DMO,
i believe this is the Object model to manipulate all
objects and collection inside the SQL Server. Please
correct me if not!.
so my second question:
What happen to ADO? Does it mean to say I can use either
of the two or pick just one to do my database work?
thank for advance. Please don't make me look stupid or
something. Remember i'm a newbie!hi newbie,
I heard from a friend that SQL 7.0 runs in win 98.
you can try.
about ADO you can download the mdac component from download.microsoft.com to
have the new drivers to access
SQL data bases. you can look for string connections here:
http://www.connectionstring.com
http://www.able-consulting.com/ADO_Conn.htm
regards,
VILMAR
BRAZIL
PRAIA GRANDE/SP
"tengtium" <tengtium@.hotmail.com> escreveu na mensagem
news:062801c3c886$1e9e75a0$a501280a@.phx.gbl...
> hi,
> before i continue, let me first gave you an overview about
> my status. i new to SQL Server before i'm just using MS
> Access database. i have a win 98se, with 32mb memory! i
> have a couple of simple app/addin and i wanted to use SQL
> Server. first i bought SQL Server 2k enterprise edition,
> but when i already installing the application if found out
> i need to upgrade my hardware and software in order to use
> it. but i don't have the money to it.
> so my first question:
> Is it possible to SQL Server2k enterprise edition on my
> computer without upgrading my software and hardware:
> so i bought the later version, SQL 7. at first glance on
> its documentation i found some interesting text. SQL-DMO,
> i believe this is the Object model to manipulate all
> objects and collection inside the SQL Server. Please
> correct me if not!.
> so my second question:
> What happen to ADO? Does it mean to say I can use either
> of the two or pick just one to do my database work?
> thank for advance. Please don't make me look stupid or
> something. Remember i'm a newbie!sql

Wednesday, March 21, 2012

Newbie question

Hi All
Is it possible to store tables (in general database objects) in SQL clients and access it from the SQL server
ThankEva
What are you trying to accomplish?
"Eva" <anonymous@.discussions.microsoft.com> wrote in message
news:2C3CCA52-4F57-409A-A331-4BFC9001F773@.microsoft.com...
> Hi All,
> Is it possible to store tables (in general database objects) in SQL
clients and access it from the SQL server?
> Thanks
>|||I am designing a system in which there are about 50 computers containing region-wise data in tables. The tables in different regions have same structure but the data is region-specific. I need to transfer data from the tables in each region to a server. The problem is that I cannot have 50 SQL servers installations. I am looking for a work around. Can you suggest what should be done
Thanks.|||Eva
REPLICATION is what you need.
http://www.swynk.com/friends/achigrik/SetupMR.asp -- Setting Up Merge
Replication: A Step by Step Guide
http://www.mssqlcity.com/Articles/Replic/Replic.htm --Setting All
Replica (Step by step)
"Eva" <anonymous@.discussions.microsoft.com> wrote in message
news:F851497F-8B3B-4A3C-9482-97B5F0B75410@.microsoft.com...
> I am designing a system in which there are about 50 computers containing
region-wise data in tables. The tables in different regions have same
structure but the data is region-specific. I need to transfer data from the
tables in each region to a server. The problem is that I cannot have 50 SQL
servers installations. I am looking for a work around. Can you suggest what
should be done?
> Thanks.|||Thanks Uri
Yes, I could have the 50 computers set up as publishers and the server as a subscriber. But, what I understand of Publishers is that they have to be SQL servers!|||Eva
How do they store the data? With text files?
Do they have an application (vb,c) which can connect to the main server?
"Eva" <anonymous@.discussions.microsoft.com> wrote in message
news:A89D4478-7858-493C-BD95-607A710004B3@.microsoft.com...
> Thanks Uri.
> Yes, I could have the 50 computers set up as publishers and the server as
a subscriber. But, what I understand of Publishers is that they have to be
SQL servers!|||Data is stored in SQL tables. There is an application running on the server which accesses the tables in each of the 50 machines and fetches data from them!|||Eva
Have you looked at DTS utility?
"Eva" <anonymous@.discussions.microsoft.com> wrote in message
news:4F67F94C-FFC2-4CB9-8ADB-2C66E427EA8C@.microsoft.com...
> Data is stored in SQL tables. There is an application running on the
server which accesses the tables in each of the 50 machines and fetches data
from them!|||Eva,
When you say "SQL Tables" do you mean tables in a SQL Server database? Or is
it in another RDBMS?
--
Andrew C. Madsen
Information Architect
Harley-Davidson Motor Company
"Eva" <anonymous@.discussions.microsoft.com> wrote in message
news:4F67F94C-FFC2-4CB9-8ADB-2C66E427EA8C@.microsoft.com...
> Data is stored in SQL tables. There is an application running on the
server which accesses the tables in each of the 50 machines and fetches data
from them!|||Can't you have just one SQL Server and have all clients store their data in this SQL Server?
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Eva" <anonymous@.discussions.microsoft.com> wrote in message
news:F851497F-8B3B-4A3C-9482-97B5F0B75410@.microsoft.com...
> I am designing a system in which there are about 50 computers containing region-wise data in tables. The
tables in different regions have same structure but the data is region-specific. I need to transfer data from
the tables in each region to a server. The problem is that I cannot have 50 SQL servers installations. I am
looking for a work around. Can you suggest what should be done?
> Thanks.

Newbie qn

Hi all,
I need a boolean field like yes/no in MS Access.
Isn't there such a data type in SQL Server?
What should I do ?
TIA,
CSharpHi,
Go for BIT data type. Bit will store either 1 or 0.
Thanks
Hari
MCDBA
"CSharp" <smitha@.asianetindia.com> wrote in message
news:e4cL2YuFEHA.3180@.TK2MSFTNGP12.phx.gbl...
> Hi all,
> I need a boolean field like yes/no in MS Access.
> Isn't there such a data type in SQL Server?
> What should I do ?
> TIA,
> CSharp
>|||... but please be aware that the bit datatype is not a Boolean datatype. Bi
t is a numeric datatype with the
values 1, 0 and NULL. It is up to the user to determine whether 1 means true
or false.
A Boolean datatype would have the truth-values "true", "false" and "unknown"
(all three are possible outcome
of a comparison, for instance). But since all datatype would need to represe
nt NULL as well, you have a bit
complexity to determine the difference etc between "unknown" and NULL, and I
believe that this is one of the
reasons why ANSI SQL-92 didn't define a Boolean datatype. SQL:1999 did, howe
ver, and AFAIK they essentially
ignored the possible differences between "unknown" and NULL.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Hari" <hari_prasad_k@.hotmail.com> wrote in message news:%23Y4GJfuFEHA.3912@.TK2MSFTNGP10.ph
x.gbl...
> Hi,
> Go for BIT data type. Bit will store either 1 or 0.
> Thanks
> Hari
> MCDBA
> "CSharp" <smitha@.asianetindia.com> wrote in message
> news:e4cL2YuFEHA.3180@.TK2MSFTNGP12.phx.gbl...
>|||Yep
Untill SQL Server 6.5 bit datatype could hold either a 1 or 0 and there was
no support for NULL. But from SQL Server 7.0 onwards, bit datatype can hold
also NULL. (My two cents
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:e#8kaEwFEHA.712@.tk2msftngp13.phx.gbl...
> ... but please be aware that the bit datatype is not a Boolean datatype.
Bit is a numeric datatype with the
> values 1, 0 and NULL. It is up to the user to determine whether 1 means
true or false.
> A Boolean datatype would have the truth-values "true", "false" and
"unknown" (all three are possible outcome
> of a comparison, for instance). But since all datatype would need to
represent NULL as well, you have a bit
> complexity to determine the difference etc between "unknown" and NULL, and
I believe that this is one of the
> reasons why ANSI SQL-92 didn't define a Boolean datatype. SQL:1999 did,
however, and AFAIK they essentially
> ignored the possible differences between "unknown" and NULL.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
>
> "Hari" <hari_prasad_k@.hotmail.com> wrote in message
news:%23Y4GJfuFEHA.3912@.TK2MSFTNGP10.phx.gbl...
>sql

Newbie Q: System DSN from DMZ?

Hello,
I have a webserver running in a DMZ off my network. It needs access to a
SQL2000 server running inside my network. How can I create a system DSN
that points to my SQL2000 server when there is no direct path?
When I create the DSN, it asks, "which SQL Server to you want to connect
to?" But, the drop down box is empty. What should I be typing in here, and
what holes do I need to create in my firewall to make it work?
-Trevori'm not a firewall expert here, but as far as i'm aware you need to open up the port for SQL server on the firewall - you ca fid this port number from the SQL Cliet manager tool|||simply type in the name of your db server when creating the dsn.
assuming your sqlserver is listening on tcp port 1433, you'll need to open up
port 1433 in the firewall, but only open the hole for your web server. check
your sql server log to see what port it's listening on.
Trevor Clark wrote:
> Hello,
> I have a webserver running in a DMZ off my network. It needs access to a
> SQL2000 server running inside my network. How can I create a system DSN
> that points to my SQL2000 server when there is no direct path?
> When I create the DSN, it asks, "which SQL Server to you want to connect
> to?" But, the drop down box is empty. What should I be typing in here, and
> what holes do I need to create in my firewall to make it work?
> -Trevor

Newbie Q: System DSN from DMZ?

Hello,
I have a webserver running in a DMZ off my network. It needs access to a
SQL2000 server running inside my network. How can I create a system DSN
that points to my SQL2000 server when there is no direct path?
When I create the DSN, it asks, "which SQL Server to you want to connect
to?" But, the drop down box is empty. What should I be typing in here, and
what holes do I need to create in my firewall to make it work?
-Trevori'm not a firewall expert here, but as far as i'm aware you need to open up
the port for SQL server on the firewall - you ca fid this port number from t
he SQL Cliet manager tool|||simply type in the name of your db server when creating the dsn.
assuming your sqlserver is listening on tcp port 1433, you'll need to open u
p
port 1433 in the firewall, but only open the hole for your web server. chec
k
your sql server log to see what port it's listening on.
Trevor Clark wrote:
quote:

> Hello,
> I have a webserver running in a DMZ off my network. It needs access to a
> SQL2000 server running inside my network. How can I create a system DSN
> that points to my SQL2000 server when there is no direct path?
> When I create the DSN, it asks, "which SQL Server to you want to connect
> to?" But, the drop down box is empty. What should I be typing in here, a
nd
> what holes do I need to create in my firewall to make it work?
> -Trevor

Newbie Q. for referencing DAO recordsets with VBA in Access front

Hi! I am brand spankin' new at this and need help! We just upsized an
Access 2002 database to having an MSDE backend. We used Access's wizzard.
In general, the forms seem to be working fine. My problem is with the VBA
underneath. The code breaks when it tries to work with recordsets. I get a
runtime error, "Item not found in this collection." Between the text book I
have and my web searches, I can't seem to figure out how I need to reference
the SQL tables or if there is a reference library that I need to activate to
make this work now. I have a lot of code like this and for the time being I
am not interested in converting it all to ADO. That can come later. I just
need to get this functional for the client.
Any help appreciated!!!
Thanks,
Andrea
YOu sure have to be a more specific to solve solve your problem. When does
the error occur ? Can you send some code and point out what fails. The error
sounds like you are accessing a column which doesnt exists in the returned
recordset. If you are using a view and you designed t with the view
designer, keep in mind that sometimes the columns are renamed to something
like "expr1" and so on. Another possible error could be that you want to
access a provider specific property which you copied from some example but
isnt supported by that provider.
Send in some information and well try to help you.
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
"Andrea M" <AndreaM@.discussions.microsoft.com> schrieb im Newsbeitrag
news:479D59C8-6D7B-4455-BA3B-D52FBE1163FB@.microsoft.com...
> Hi! I am brand spankin' new at this and need help! We just upsized an
> Access 2002 database to having an MSDE backend. We used Access's wizzard.
> In general, the forms seem to be working fine. My problem is with the VBA
> underneath. The code breaks when it tries to work with recordsets. I get
> a
> runtime error, "Item not found in this collection." Between the text book
> I
> have and my web searches, I can't seem to figure out how I need to
> reference
> the SQL tables or if there is a reference library that I need to activate
> to
> make this work now. I have a lot of code like this and for the time being
> I
> am not interested in converting it all to ADO. That can come later. I
> just
> need to get this functional for the client.
> Any help appreciated!!!
> Thanks,
> Andrea

Monday, March 19, 2012

Newbie needs to be told where to go! (Cross-Post)

Greetings:
I've been developing web applications with asp/sql and access for some
time now on existing servers. I am now in a situation that requires me to
install SQL Server (SBS 2K sp3) as the backend for an intranet served from
IIS. I've installed the SQL services and have created the database and I
have some of the web based application written, no problem, but I've yet to
be able to access the database that I created on the newly installed SQL
server from the web based applications. Even after setting up the virtual
directory with the IIS SQL snap-in, I only get a DNS Server not found error
when I try to browse the site. If I remove the IIS/SQL virtual directory, I
can browse pages that don't error out due to data references.
Where can I find a walk through for setting up SQL Server and IIS to
function together in this very basic manner?
Thanks in advance.
--
Jerry M. Gartner
www.gartnerwebdev.comHi,
Have a look at these...
http://support.microsoft.com/default.aspx?scid=kb;EN-
US;176378
http://support.microsoft.com/default.aspx?scid=kb;EN-
US;176380
http://support.microsoft.com/default.aspx?scid=kb;zh-
cn;chs264921
http://support.microsoft.com/default.aspx?scid=kb;PL;264921
http://support.microsoft.com/default.aspx?scid=kb;EN-
US;245243
>--Original Message--
>Greetings:
> I've been developing web applications with asp/sql
and access for some
>time now on existing servers. I am now in a situation
that requires me to
>install SQL Server (SBS 2K sp3) as the backend for an
intranet served from
>IIS. I've installed the SQL services and have created
the database and I
>have some of the web based application written, no
problem, but I've yet to
>be able to access the database that I created on the
newly installed SQL
>server from the web based applications. Even after
setting up the virtual
>directory with the IIS SQL snap-in, I only get a DNS
Server not found error
>when I try to browse the site. If I remove the IIS/SQL
virtual directory, I
>can browse pages that don't error out due to data
references.
> Where can I find a walk through for setting up SQL
Server and IIS to
>function together in this very basic manner?
>Thanks in advance.
>
>--
>Jerry M. Gartner
>www.gartnerwebdev.com
>
>.
>|||Peter:
Preliminarily, this appears to be what I'm looking for. I didn't think
to use ODBC and a DSN. What are the major differences between ODBC and
"direct" connection? There will be under 30 clients using the DB - this is
an on demand intranet application and will be hit lightly and sporadically
throughout the day. The SQL server is also the PDC and fileserver/DFS root
and gateway. (2K SP4)
--
Jerry M. Gartner
www.gartnerwebdev.com
"Peter" <anonymous@.discussions.microsoft.com> wrote in message
news:03de01c3a83a$14ef9140$a001280a@.phx.gbl...
> Hi,
> Have a look at these...
> http://support.microsoft.com/default.aspx?scid=kb;EN-
> US;176378
> http://support.microsoft.com/default.aspx?scid=kb;EN-
> US;176380
> http://support.microsoft.com/default.aspx?scid=kb;zh-
> cn;chs264921
> http://support.microsoft.com/default.aspx?scid=kb;PL;264921
> http://support.microsoft.com/default.aspx?scid=kb;EN-
> US;245243

Newbie needs help with SQL 2000

I currently use Dreamweaver MX, ASP, MS Access & VBScript - but apparently I
need to get something more stable -

I have been told that the best option would be MS SQL2000 - however, I
really don't know where to start.

Can anybody point me in the right direction of a "simple" step by step
tutorial to get me started with this.

Thanks guys!Paul wrote:

> I currently use Dreamweaver MX, ASP, MS Access & VBScript - but apparently I
> need to get something more stable -
> I have been told that the best option would be MS SQL2000 - however, I
> really don't know where to start.
> Can anybody point me in the right direction of a "simple" step by step
> tutorial to get me started with this.
> Thanks guys!

What makes you think that the data storage is the cause of the stability
problems? What types of problems are you having? Honestly, given that
mix of web code, I'd bet $1 that the stability issues reside in the code
and not in your database. Before you make the drastic and expensive
switch to SQL server, I recommend you do some additional research into
your problem.

Zach|||Hi Zach

Thanks for the reply

Basically, we have had a few problems with the database going corrupt on us
as well as the speed issue-

As I only want to develop the website ive been told that I only need to get
the Microsoft Desktop Engine (rather than the Server package itself), or I
could manage it via MS Access (ODBC)

Is this correct?

Thanks again

"Zach Wells" <individual_news@.nibsworld.com> wrote in message
news:2gc868F12nd1U1@.uni-berlin.de...
> Paul wrote:
> > I currently use Dreamweaver MX, ASP, MS Access & VBScript - but
apparently I
> > need to get something more stable -
> > I have been told that the best option would be MS SQL2000 - however, I
> > really don't know where to start.
> > Can anybody point me in the right direction of a "simple" step by step
> > tutorial to get me started with this.
> > Thanks guys!
> What makes you think that the data storage is the cause of the stability
> problems? What types of problems are you having? Honestly, given that
> mix of web code, I'd bet $1 that the stability issues reside in the code
> and not in your database. Before you make the drastic and expensive
> switch to SQL server, I recommend you do some additional research into
> your problem.
> Zach|||Paul wrote:

> Hi Zach
> Thanks for the reply
> Basically, we have had a few problems with the database going corrupt on us
> as well as the speed issue-
> As I only want to develop the website ive been told that I only need to get
> the Microsoft Desktop Engine (rather than the Server package itself), or I
> could manage it via MS Access (ODBC)
> Is this correct?
> Thanks again

Yes, MSDE would be a cheaper alternative. I honestly don't know a whole
lot about it so I don't know what kind of licensing issues you'll run
into when using it for a web back-end.

Zach

newbie needs help with @@identity

I have a form that submits to multiple tables. After insertion into the first table I need to access the identity key from the record and use is to associate a record in another table. The form element I'm inserting into the second table however, is not a required field so I think I need to check IS NOT NULL first. In my code below I have copied the insert statement for the first table and the conditional and subsequent insert into the 2nd table. I am uncertain where and how I get and use @.@.identity. The error I'm getting when I run the Check Syntax button is: 'incorrect syntax near @.@.identity.'

I appreciate someone telling me how to correct my syntax.

INSERT INTO GPRA_Activities
(
SubmitDate,
StaffId,
GPRAId,
FreedomID,
DocumentDesc,
ActivityTitle,
ActivityDesc

)
VALUES
(
getDate(),
@.StaffId,
@.GPRAId,
@.FreedomID,
@.DocumentDesc,
@.ActivityTitle,
@.ActivityDesc

SELECT @.@.identity
)

if @.KeywordId1 IS NOT NULL

@.@.identity smallint,

INSERT INTO GPRA_KeywordsUsed
(
ActivityId,
KeywordId
)
VALUES
(
@.@.identity,
@.KeywordId1
)

GO

You need to get the value of @.@.IDENTITY Into a local variable and use it. You cannot use the @.@.IDENTITY by itself.

Declare @.valintINSERT INTO GPRA_Activities(SubmitDate,StaffId,GPRAId,FreedomID,DocumentDesc,ActivityTitle,ActivityDesc)VALUES (getDate(),@.StaffId,@.GPRAId,@.FreedomID,@.DocumentDesc,@.ActivityTitle,@.ActivityDesc)SELECT @.val = SCOPE_IDENTITY()if @.KeywordId1ISNOT NULL-- @.@.identity smallint, I dont know what you are trying to do hereINSERT INTO GPRA_KeywordsUsed ( ActivityId, KeywordId )VALUES ( @.val, @.KeywordId1 )GO

|||

I finally got the SQL code below not to error (though I haven't been able to submit my form yet. Keep getting error message about expected number of parameters. That one will be my nemesis.

What is the difference between @.@.identy and SCOPE_IDENTITY?

DECLARE
@.ActivityId smallint
SELECT @.ActivityId = @.@.Identity

if @.KeywordId1 IS NOT NULL


INSERT INTO GPRA_KeywordsUsed
(
ActivityId,
KeywordId
)
VALUES
(
@.ActivityId,
@.KeywordId1
)

|||

SCOPE_IDENTITY and @.@.IDENTITY return the last identity values that are generated in any table in the current session. However, SCOPE_IDENTITY returns values inserted only within the current scope; @.@.IDENTITY is not limited to a specific scope.

|||

I'm new at this so please forgive my ignorance.

So, if I use @.@.identity and there are multiple users of the application at once, could the wrong identity get "grabbed"?

|||

Possible. HEre's some info from Books on line:

For example, there are two tables,T1 andT2, and an INSERT trigger is defined onT1. When a row is inserted toT1, the trigger fires and inserts a row inT2. This scenario illustrates two scopes: the insert onT1, and the insert onT2 by the trigger.

Assuming that bothT1 andT2 have identity columns, @.@.IDENTITY and SCOPE_IDENTITY will return different values at the end of an INSERT statement onT1. @.@.IDENTITY will return the last identity column value inserted across any scope in the current session. This is the value inserted inT2. SCOPE_IDENTITY() will return the IDENTITY value inserted inT1. This was the last insert that occurred in the same scope. The SCOPE_IDENTITY() function will return the null value if the function is invoked before any INSERT statements into an identity column occur in the scope.

|||thank you. I'll change it.