Showing posts with label explorer. Show all posts
Showing posts with label explorer. Show all posts

Monday, March 19, 2012

Manually Inserting Data in DateTime Field

Using Server Explorer in VB 2005, I am manually entering data in a table in a SQL Server 2005 Express database that includes a DateTime field. I have tried every conceivable format, but no matter what I try get one of these 2 errors:

1. String was not recognized as valid DateTime

2. Operand type class; text incompatible with DateTime

I have Googled this to death, but no example which involves trying to enter the data manually, say from Server Explorer.

Formats tried include all datetime formats (mmddyy, yymmdd, using dashes or slashes, enclosing in single quotes or pound signs).

I would appreciate if someone could please give me an example that I can literally insert without error.

hi,

I tried myself inserting via the VS designer the following:

2006-09-19 (it works)
2006/09/19 (it works)
19/09/2006 (it works)
19-09-2006 (it works)

the 2 last entries are dangerous as the server could misunderstand the datetime format... my pc has the italian locale set, so it could be ok, but I do advise to use a "general" ISO format that can not bring to misunderstanding, thus YYYY-MM-DD

regards

|||

Andrea, appreciate the response, but I tried your suggestions, and some related ones (09/19/2006), and they did not work. The error was Operand type clash; text incompatible with DateTime.

Again, I am opening the SQL Server 2005 Express database, then the table, from Server Explorer, and then choosing Show Table Data from the shortcut menu, and then typing the data into the datetime column field. Any further ideas would be appreciated.

|||I am an idiot. I was typing the data into the wrong field. Your suggestions work. Sorry for wasting your time.

Wednesday, March 7, 2012

Managing PK/FK Relationships with the Tools

Ah, why doesn't SQL Server Management Studio (SSMS) or Visual Studio's Server Explorer permit me to set PK/FK constraints on the tables? They're supported in SQL Everywhere (SQL Ev), but I don't see a way to set them up.

Why don't these tools support scripting the database tables to SQL? Is this planned?

Bill,

Obviously Microsoft will have to address the why, but in terms of the how, there is a nice third party tool that might help you out. See www.primeworks.pt.

You are correct though, the degree to which you can manage constraints on SQL Mobile databases in SQL Server 2005 Management Studio is limited unless you write the DDL yourself. VS2005 is even more limited.

Darren

|||I took a quick look at the primeworks utilities. Yes, I think that's probably the best answer. Thankfully, the third-party community can step in where MS falls short. Hopefully the "Data Dude" (I hate that name) code will help, but it's gross overkill for most SQLCE developers--it's like sending a patient to an ICU for a stubbed toe.

Monday, February 20, 2012

Management Studio to remember servers?

If I "Connect" to different SQL Servers in Object Explorer, close and reopen SQL Management Studio, the list of Servers is Object Explorer is blank. Each time I need to re-connect to my list of SQL Severs.

Anyone know how to get Management Studio to remember list of connctions in Object Explorer?

Thanks,

Chris Skor

I don't belive this is possible, and would probably be a bit too much. Do you use Registered Servers? Register each server you use reguarly, then it is easy enough to just double click the server so that it connects and opens object explorer. Hopefully this will suffice?|||

In addition, you can configure SSMS to start up without prompting for a connection.

Tools -> Options -> "At Start up:" "Open an empty environment" is the setting you'll want.

This way you can jump into the environment really quick and then select the server to connect to using the Register Servers tool window. You can use folders in this window to group servers.

Management Studio Solution Explorer

Is it possible to set up management studio so the solution explorer is on a
shared network directory?
Exactly what do you mean by "the solution explorer is on a shared network directory"?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Mark" <Mark@.discussions.microsoft.com> wrote in message
news:BF538172-1FB0-40BF-91E6-BDAC02ADA867@.microsoft.com...
> Is it possible to set up management studio so the solution explorer is on a
> shared network directory?
|||I mean that the solution explorer is set to a shared network directory so a
team can share the sql solutions. Assuming of course that there is no
compatible version control software.
"Tibor Karaszi" wrote:

> Exactly what do you mean by "the solution explorer is on a shared network directory"?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Mark" <Mark@.discussions.microsoft.com> wrote in message
> news:BF538172-1FB0-40BF-91E6-BDAC02ADA867@.microsoft.com...
>
|||You can open a solution on a network drive (I just tried it). Whether you can have several users
working on the same solution at the same time, I'm afraid I don't know.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Mark" <Mark@.discussions.microsoft.com> wrote in message
news:7448AB4A-57AD-40D5-9A39-20C7BF70C72B@.microsoft.com...[vbcol=seagreen]
>I mean that the solution explorer is set to a shared network directory so a
> team can share the sql solutions. Assuming of course that there is no
> compatible version control software.
> "Tibor Karaszi" wrote:

Management Studio Solution Explorer

Is it possible to set up management studio so the solution explorer is on a
shared network directory?Exactly what do you mean by "the solution explorer is on a shared network di
rectory"?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Mark" <Mark@.discussions.microsoft.com> wrote in message
news:BF538172-1FB0-40BF-91E6-BDAC02ADA867@.microsoft.com...
> Is it possible to set up management studio so the solution explorer is on
a
> shared network directory?|||I mean that the solution explorer is set to a shared network directory so a
team can share the sql solutions. Assuming of course that there is no
compatible version control software.
"Tibor Karaszi" wrote:

> Exactly what do you mean by "the solution explorer is on a shared network
directory"?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Mark" <Mark@.discussions.microsoft.com> wrote in message
> news:BF538172-1FB0-40BF-91E6-BDAC02ADA867@.microsoft.com...
>|||You can open a solution on a network drive (I just tried it). Whether you ca
n have several users
working on the same solution at the same time, I'm afraid I don't know.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Mark" <Mark@.discussions.microsoft.com> wrote in message
news:7448AB4A-57AD-40D5-9A39-20C7BF70C72B@.microsoft.com...[vbcol=seagreen]
>I mean that the solution explorer is set to a shared network directory so a
> team can share the sql solutions. Assuming of course that there is no
> compatible version control software.
> "Tibor Karaszi" wrote:
>

Management Studio Solution Explorer

Is it possible to set up management studio so the solution explorer is on a
shared network directory?Exactly what do you mean by "the solution explorer is on a shared network directory"?
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Mark" <Mark@.discussions.microsoft.com> wrote in message
news:BF538172-1FB0-40BF-91E6-BDAC02ADA867@.microsoft.com...
> Is it possible to set up management studio so the solution explorer is on a
> shared network directory?|||I mean that the solution explorer is set to a shared network directory so a
team can share the sql solutions. Assuming of course that there is no
compatible version control software.
"Tibor Karaszi" wrote:
> Exactly what do you mean by "the solution explorer is on a shared network directory"?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Mark" <Mark@.discussions.microsoft.com> wrote in message
> news:BF538172-1FB0-40BF-91E6-BDAC02ADA867@.microsoft.com...
> > Is it possible to set up management studio so the solution explorer is on a
> > shared network directory?
>|||You can open a solution on a network drive (I just tried it). Whether you can have several users
working on the same solution at the same time, I'm afraid I don't know.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Mark" <Mark@.discussions.microsoft.com> wrote in message
news:7448AB4A-57AD-40D5-9A39-20C7BF70C72B@.microsoft.com...
>I mean that the solution explorer is set to a shared network directory so a
> team can share the sql solutions. Assuming of course that there is no
> compatible version control software.
> "Tibor Karaszi" wrote:
>> Exactly what do you mean by "the solution explorer is on a shared network directory"?
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>> Blog: http://solidqualitylearning.com/blogs/tibor/
>>
>> "Mark" <Mark@.discussions.microsoft.com> wrote in message
>> news:BF538172-1FB0-40BF-91E6-BDAC02ADA867@.microsoft.com...
>> > Is it possible to set up management studio so the solution explorer is on a
>> > shared network directory?
>>