Showing posts with label msde. Show all posts
Showing posts with label msde. Show all posts

Wednesday, March 21, 2012

Problem with 1 Table in MSDE DB

Hello all.

First I will be the first to say that I'm very inexperienced when it comes to working with MS SQL DBs. I'm doing my best to learn though.

Here is my problem. I have a piece of software that connects up to an MSDE instance. Within this instance there is a database called TTUSER. And within the TTUSER database, there are several tables, one of which called User. I can not seem to do anything with this table. For example when I just try to see the contents of the UserID column, I get:

1> select UserID from User
2> go
Msg 156, Level 15, State 1, Server <MyMsdeServerName>, Line 1
Incorrect syntax near the keyword 'User'.

However, when I try the exact same command above, but use the Logon table instead of the User table, it works just fine, and I see the contents of the UserID column from the Logon table.

I also tried copying the User Table with this:

1> select * into Test from User
2> go
Msg 156, Level 15, State 1, Server 10250-JORUM, Line 1
Incorrect syntax near the keyword 'User'.

And again, if I just substitute the User table with the Logon table, it copies just fine. Both of these tables, Logon and User, are in the same database, TTUser.

I would just like to be able to view the contents of the User table from command line, and maybe send it into a text file. Thanks for your help.

Jnuw"User" is a keyword. Try this:

select *
from [User]|||MCrowley, thank you! That did the trick.

Tuesday, March 20, 2012

Problem with "SQL Server does not exist" error

I have a couple of databases developed and being used in MSDE. The
db's are used and maintained from a couple of programs written in
Visual Basic 6 (using an ADO connection) (these programs run on a
separate computer).
I've just set up a new computer and installed SQL Server Express 2005
on it. I copied the .MDF files from the MSDE unit and attached them to
SQLExpress.
Now, when I try to connect to the databases, I get the "SQL Server
does not exist or access is denied" error. I have, of course, modified
the connection string such that the Data Source property is using the
correct computer name.
I've looked at everything I can think of but obviously I'm missing
something fundamental here. Any suggestions as to what I might be
doing wrong?
Thanks.
On Mon, 20 Nov 2006 16:22:39 +0100, "Andrea Montanari"
<andrea.sqlDMO@.virgilio.it> wrote:

>hi Martin,
>Martin wrote:
>please verify the instance name is correct (in the form
>ComputerName\InstanceName), the remote computer can access the lan and the
>remote SQLExpress installed computer, firewall (both) have been set with the
>appropriate exception(s) allowing connectivity and trafic (both the DBEngine
>used port and the SQLBrowser, if used), the SQLExpress network protocols
>have been enabled, the Surface Area Configuration ahs been set to allow
>remote connections...
Thanks, Andrea. I've gone thru your list but still no luck.
* the name of the new computer is "CATServer" (it's not actually a
"server" - it's running WinXP Pro with all current service packs and
updates). I've tried setting the Data Source to both "CATSERVER" and
"CATSERVER\SQLEXPRESS". Neither way seemed to make any difference.
* the remote computer CAN access CATServer. I have one folder on
CATServer shared and it can be viewed in Windows Explorer. Also, I can
ping CATServer successfully.
* there are no firewalls running on either computer.
* the network protocols: Shared Memory, Named Pipes and TCP/IP are
enabled; VIA is not enabled.
* the Surface Area Configuration was something I did not know anything
about. Remote Connections were set to "Local Connections Only". I
changed that to "Local and Remote" (for both TCP/IP and Named Pipes)
and then stopped and restarted the server service. It made no
difference. I also re-booted the computer but that, too, made no
difference.
Any other thoughts?
|||On Mon, 20 Nov 2006 18:20:18 +0100, "Andrea Montanari"
<andrea.sqlDMO@.virgilio.it> wrote:

>hi Martin,
>Martin wrote:
>http://support.microsoft.com/default.aspx?scid=kb;en-us;328306&Product=sql
Thanks again. I've gone through that fairly well but still haven't
been able to get connected.
I did stumble on to something though: I started the "SQL Server
Browser". Now, when my VB6 program tries to connect, I'm getting a
different error message: "Login failed for user 'userid'" (where
userid is the userid that's in my connect string).
Does this mean that SQL Server Browser has to be running in order for
my program to connect?
Also, when I posted earlier, I was using msado 2.5 in my VB program.
One of the things in the page you referenced mentioned that I needed
at least version 2.6. I have 2.7 (and 2.8) on the machine where VB is
running so I changed the reference to 2.7. That did not seems to make
any difference however. Does that shed any light on the problem I
might be up against?
|||On Mon, 20 Nov 2006 07:58:39 -0700, Martin <martinvalley@.comcast.net>
wrote:

>I have a couple of databases developed and being used in MSDE. The
>db's are used and maintained from a couple of programs written in
>Visual Basic 6 (using an ADO connection) (these programs run on a
>separate computer).
>I've just set up a new computer and installed SQL Server Express 2005
>on it. I copied the .MDF files from the MSDE unit and attached them to
>SQLExpress.
>Now, when I try to connect to the databases, I get the "SQL Server
>does not exist or access is denied" error. I have, of course, modified
>the connection string such that the Data Source property is using the
>correct computer name.
>I've looked at everything I can think of but obviously I'm missing
>something fundamental here. Any suggestions as to what I might be
>doing wrong?
>Thanks.
I finally got this working - sorta...
I had to do three things: I added "\SQLExpress" to the Data Source
name in the client program's connection string. Also in the client
program, I upgraded to version 2.8 of MSADO. On the server side of
things, I added the Login that I was trying to use from the client
side.
With these changes, I am now able to access the data on the server as
needed from the client programs.
With one major exception:
After I got everything working, I recompiled one of the VB programs
and installed it on another computer (call it computer B for
reference). But, when I run it, it encounters the exact same error
condition that I had originally! IOW, this thing works from computer A
but not from computer B.
Yes, computer B has version 2.8 of MSADO on it (I downloaded and
installed a verification tool and checked it out). Computer B has
access to the server computer where SQL Express is running (they're
all on the same LAN).
I'm stumped. Anyone have any ideas what the problem might be?
|||>I finally got this working - sorta...
>I had to do three things: I added "\SQLExpress" to the Data Source
>name in the client program's connection string. Also in the client
>program, I upgraded to version 2.8 of MSADO. On the server side of
>things, I added the Login that I was trying to use from the client
>side.
>With these changes, I am now able to access the data on the server as
>needed from the client programs.
>With one major exception:
>After I got everything working, I recompiled one of the VB programs
>and installed it on another computer (call it computer B for
>reference). But, when I run it, it encounters the exact same error
>condition that I had originally! IOW, this thing works from computer A
>but not from computer B.
>Yes, computer B has version 2.8 of MSADO on it (I downloaded and
>installed a verification tool and checked it out). Computer B has
>access to the server computer where SQL Express is running (they're
>all on the same LAN).
>I'm stumped. Anyone have any ideas what the problem might be?
>
OK, got it going...
Apparently, I have to have the SQL Server Browser service running in
order to connect from computer "B".
Why the Browser service is not needed by computer "A", I have no idea.
|||On Thu, 23 Nov 2006 12:09:01 +0100, "Andrea Montanari"
<andrea.sqlDMO@.virgilio.it> wrote:

>hi Martin,
>Martin wrote:
>SQLBrowser is not needed for local connections as they are not resolved over
>the TCP/IP stack but via shared memory and the port is directly resolved via
>local access...
>try modifying the network protocol (SQL Server Management Studio Express,
>connection dialog, "Options", "Network Protocol" = TCP/IP... you will not
>ba able to connect from local client as well..
I assume by "local connections" you mean "on the same physical
computer where SQL Server is running"? If so, then that is NOT the
case here. Both computer "A" and computer "B" in my situation are
"remote" - that is, they are separate computers on the LAN.
Again, it would seem to me that if one can connect, then the other
should be able to also.

Saturday, February 25, 2012

Problem using MSDE

Hi
I have been trying to use the MSDE

info
MSDE installed
sa (has a password)
tried with both mixed and single mode change in registry and later on install
SQL server icon running in the system tray
several reboots and reinstalls over days

I can create a web page that connects to a DB and says connected and disconnected
but I cannot get any data displayed?

I have tried the portal starter Kit and it cannot find the sql server on the install
If I try to do it remotely it wants me to run stuff in a query analyser and some .sql files
but MSDE does not have an interface as such

I am very confused and I just want the system to connect to the db or for the portal to work

Please help

Thank you all in advanceCan you connect to your MSDE through the Server Explorer in Studio?

If so, then you can create a Database Project which will give you a platform from which to interact with your MSDE instance.

Problem using linked tables instead of ADP

Hi
I know I probably shouldn't be doing this but...
I have a table on an MSDE database that has a bigInt for the primary key. If
I try to link to this table from Access (XP) using an ODBC connection the
table links ok. The first time I opened the table it was ok. Since then the
primary key data type is interpretted as text and all the records (though
still there) have "#deleted" in each column of every row? I have tried
relinking the table and still get he same problem.
Any ideas whats going on?
Thanks in advance
Mark
Have you linked the table such that Access recognizes the primary key?
"Mark" wrote:

> Hi
> I know I probably shouldn't be doing this but...
> I have a table on an MSDE database that has a bigInt for the primary key. If
> I try to link to this table from Access (XP) using an ODBC connection the
> table links ok. The first time I opened the table it was ok. Since then the
> primary key data type is interpretted as text and all the records (though
> still there) have "#deleted" in each column of every row? I have tried
> relinking the table and still get he same problem.
> Any ideas whats going on?
> Thanks in advance
> Mark
>
>
|||Hi Monte

> Have you linked the table such that Access recognizes the primary key?
>
As far as I know, yes? I wasn't prompted to select a primary key and looking
at the table design from within access shows the primary key present but as
text instead of number.
Cheers
Mark
|||I have also seen this problem occur when I have "bit" type fields in the SQL
table, and don't have a default value (say zero) and allow nulls checked.
"Mark" wrote:

> Hi Monte
>
> As far as I know, yes? I wasn't prompted to select a primary key and looking
> at the table design from within access shows the primary key present but as
> text instead of number.
> Cheers
> Mark
>
>
|||"Monte" <Monte@.discussions.microsoft.com> wrote in message
news:46D395BA-E150-4C96-9EDE-AF4776FBC18A@.microsoft.com...
>I have also seen this problem occur when I have "bit" type fields in the
>SQL
> table, and don't have a default value (say zero) and allow nulls checked.
Monte
Scary stuff hey :o{
I'm not going to worry about it too much as I was just playing to see the
difference in performance etc. Would still be interested to know why, may
have another look later...
Cheers
Mark

Monday, February 20, 2012

Problem using bcp with SQL MSDE

I successfully tested a bcp command similar to that below on a Small Business Manager database using SQL Enterprise Edition:
bcp "SELECT EMPLOYID FROM TWO..UPR00100" queryout testfile.txt -U login -P -C
I then tried using the same basic command for another Small Business Manager installation using SQL Desktop Edition. But I get the following:
SQLState = 08001, NativeError = 17
Error = [Microsoft][ODBC SQL Server Driver][DBNETLIB] SQL Server does not
exist or access denied.
The only other difference I'm aware of aside from the SQL edition is that an
'sa' password exists for the second environment. But I put the password in
the bcp command.
Does anyone have an idea why the bcp command works in the one
environment but not the other?
Thanks,
Tom
hi Tom,
"Tom Glasser" <Tom Glasser@.discussions.microsoft.com> ha scritto nel
messaggio news:3076FF6F-2708-4908-9149-6B0E148E6087@.microsoft.com...
> I successfully tested a bcp command similar to that below on a Small
Business Manager database using SQL Enterprise Edition:
> bcp "SELECT EMPLOYID FROM TWO..UPR00100" queryout testfile.txt -U
login -P -C
> I then tried using the same basic command for another Small Business
Manager installation using SQL Desktop Edition. But I get the following:
> SQLState = 08001, NativeError = 17
> Error = [Microsoft][ODBC SQL Server Driver][DBNETLIB] SQL Server does not
> exist or access denied.
> The only other difference I'm aware of aside from the SQL edition is that
an
> 'sa' password exists for the second environment. But I put the password
in
> the bcp command.
> Does anyone have an idea why the bcp command works in the one
> environment but not the other?
>
please have a look at
http://support.microsoft.com/default...B;EN-US;328306
it's possible that your 2nd environment does not accept SQL Server
authenticated connection... if this is the case, please have a look at
http://support.microsoft.com/default...b;en-us;285097 for further
info on how to hack the Windows Registry in order to allow SQL Server
quthenticated connections..
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.8.0 - DbaMgr ver 0.54.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply

Problem using bcp with SQL MSDE

I successfully tested a bcp command similar to that below on a Small Business Manager database using SQL Enterprise Edition:
bcp "SELECT EMPLOYID FROM TWO..UPR00100" queryout testfile.txt -U login -P -C
I then tried using the same basic command for another Small Business Manager installation using SQL Desktop Edition. But I get the following:
SQLState = 08001, NativeError = 17
Error = [Microsoft][ODBC SQL Server Driver][DBNETLIB] SQL Server does not
exist or access denied.
The only other difference I'm aware of aside from the SQL edition is that an
'sa' password exists for the second environment. But I put the password in
the bcp command.
Does anyone have an idea why the bcp command works in the one
environment but not the other?
Thanks,
Tom
hi Tom,
"Tom Glasser" <Tom Glasser@.discussions.microsoft.com> ha scritto nel
messaggio news:3076FF6F-2708-4908-9149-6B0E148E6087@.microsoft.com...
> I successfully tested a bcp command similar to that below on a Small
Business Manager database using SQL Enterprise Edition:
> bcp "SELECT EMPLOYID FROM TWO..UPR00100" queryout testfile.txt -U
login -P -C
> I then tried using the same basic command for another Small Business
Manager installation using SQL Desktop Edition. But I get the following:
> SQLState = 08001, NativeError = 17
> Error = [Microsoft][ODBC SQL Server Driver][DBNETLIB] SQL Server does not
> exist or access denied.
> The only other difference I'm aware of aside from the SQL edition is that
an
> 'sa' password exists for the second environment. But I put the password
in
> the bcp command.
> Does anyone have an idea why the bcp command works in the one
> environment but not the other?
>
please have a look at
http://support.microsoft.com/default...B;EN-US;328306
it's possible that your 2nd environment does not accept SQL Server
authenticated connection... if this is the case, please have a look at
http://support.microsoft.com/default...b;en-us;285097 for further
info on how to hack the Windows Registry in order to allow SQL Server
quthenticated connections..
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.8.0 - DbaMgr ver 0.54.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply