|
Thanks for the information.
|
|
|
|
|
Hi all!!
What is the difference between the nvarchar and varchar datatype? And so goes the ntext and text datatype? And the rest..
Regards,
ma se
|
|
|
|
|
ma se wrote: What is the difference between the nvarchar and varchar datatype?
nvarchar is 16-bit characters, varchar is just 8-bit characters.
ma se wrote: And so goes the ntext and text datatype?
Same deal
ma se wrote: And the rest
You mean nchar Vs. char? Same deal again.
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
Another dumb question, the difference between 8-bit and 16 bit characters are? Give me an example of an 8-bit character, and an example of a 16-bit character please.
And would it be better to rather just use nvarchar instead of varchar? Or when will you use the two in two different scenarios?
Thanks
|
|
|
|
|
Typically languages that use Latin characters are 8-bit. For example, English, French, Spanish, German, and so on. More complex languages that require more symbols use a 16-bit character set.
If in doubt go for nvarchar.
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
Thanks alot.
When is your website going to be up and running. What type of content will be hosted on it?
Do you know where I can read some usefull articles on the Internet about SQL Server 2005 and it's datatypes?
How do you access your tables in SQL Server 2005? I downloaded the trial version for 6 months, but I can't seem to find a GUI like Enterprise manager.
Regards,
ma se
|
|
|
|
|
ma se wrote: When is your website going to be up and running. What type of content will be hosted on it?
Hopefully in the next few weeks. It will evolve to have many things. Initially, I'll be putting up my articles. I'll also be putting up the slides from the presentations that I do.
ma se wrote: Do you know where I can read some usefull articles on the Internet about SQL Server 2005 and it's datatypes?
Not off the top of my head - I bought some books on SQL Server 2005 instead.
ma se wrote: How do you access your tables in SQL Server 2005? I downloaded the trial version for 6 months, but I can't seem to find a GUI like Enterprise manager.
Use the SQL Server Management Studio. It is a cross between Enterprise Manager and the Visual Studio 2005 IDE.
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
Please let me know when your site is up and running. I hope your presentations are available for download. I only have the Internet at work and I don't have speakers here. I'll have to download and take the files home.
The SQL Server books that you bought, are they for novices as well, or for the more experienced people? You're welcome to share the ISBN numbers.
Does SQL Server Management Studio come with SQL Server 2005, or is it a separate download? What do you use to develop in, Visual Web Developer?
|
|
|
|
|
ma se wrote: The SQL Server books that you bought, are they for novices as well, or for the more experienced people?
I'd say it was for people who had some knowledge of SQL Server 2000 and are primarily developers and not Database Admins.
Introducing SQL Server 2005 for Developers[^]
There are some beginners guides (e.g. Microsoft SQL Server 2005 for Dummies[^]) but I can't say whether they are any good or not as I've not looked at them.
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
Hello ma se,
There are 3 new max data types in Sql server 2005.
varchar(max),
nvarchar(max),
varbinary(max)
these are the replacements of Text, ntext, and image data types in its predecessors.
The above mentioned new data types can hold upto 2GB of data. Hope this helps!
thanks
-L
|
|
|
|
|
Hello guys and girls.
I'm creating a Windows service with .NET, C# and SQL Server.
I have a strange problem with the SQLConnection class. Whenever I choose to call the "Open()" method. It throws an exception with message: "Instance Failure". That's it. Nothing else, just that simple message. What could be wrong?
I've checked the following:
- The database server is running.
- The computer do have access to the database server (some of my other projects can access the data, and they use the same connection framework as the Windows service).
- My user has access to the database.
- If I install and run the service on the same computer as the database server, it still doesn't work.
Any clues would be appreciated! Thanks in advance!
/S
|
|
|
|
|
u may need to install sql server service pack 2
|
|
|
|
|
Perhaps.
But I still don't understand, why my other applications, that use the exact same framework, can access the server's data.
This makes no sense.
Best regards
Soeren
|
|
|
|
|
I have noticed, that the instance failures is caused by an InvalidOperationException, whenever I call the Open() method of the SQLConnection object.
But it still makes no sense.
Could it be a db permission problem?
/Soeren
|
|
|
|
|
Okay. Here is a semi-solution to the problem:
It is a permission problem. When the Windows service is running, it uses some obscure username and password to contact the database server. Even though I tell the computer to run the service as a specific user, it still does not work.
Then I tried to use SQL authentication instead of integrated security. Now it works. So my conclusion is: Permission problems.
If anyone has any idea on how this service/run-as-user-thing works. An explanation would be most helpfull.
Thanks in advance.
/Soeren
|
|
|
|
|
ANSWER: - check the connection string. If there are any escape chars then make sure you have them correct for the language you are using.
VB "Server=mycomputer\myinstance"
C# "Server=mycomputer\\myinstance"
C# @"Server=mycomputer\myinstance"
|
|
|
|
|
I have an excel file.The data is in range B5:L618 and range has head.The sheet name is sheet1.I do the following to get columns info.
DataTable dt = new DataTable();
dt = myConn.GetOleDbSchemaTable(OleDbSchemaGuid.Columns,
new object[] {null, null, tblName, "TABLE"});
I set the tblName to [sheet1$B5:L618]
When I bind dt to DataGrid,DataGrid is empty.
I think the problem is tblName doesn't exist.How should I do?
|
|
|
|
|
Hello All,
I took the backup of a database in SQL-Server 2000.
The machine just got shut down because of lack of power supply.
After that when I tried to restore the database, then the following message came:Microsoft SQL-DMO (ODBC SQLState: 42000). An internal consistency error occurred. Contact technical support for assistance. Restore database is terminating abnormally.
I gave the path of database-backup file correctly and I also gave the RESTORE Command properly.
Can anyone suggest me how to fix this error.
Thanks,
misecprj
misecprj
|
|
|
|
|
Does anyone know how I can put a constrain on a temporary table? I put a constraint on it just fine, but a problem occurs when two users call the proc at the same time it tells me that the object already exists in the database.
***Edit
I forgot to mention its SQL Server 2003.
"People who never make mistakes, never do anything."
My Blog
-- modified at 16:03 Monday 13th February, 2006
|
|
|
|
|
Hi there,
I am trying to create a DDL trigger here is the code.
CREATE TRIGGER DDLTRIGGER ON DATABASE
FOR DDL_DATABASE_LEVEL_EVENTS
AS
DECLARE @eventData XML
SET @eventData = EventData()
INSERT DDLEVENTLOG
(EVENTTYPE
)
VALUES
(
CONVERT (NVARCHAR(100), @eventData.Query('data(//EventType)'))
)
But its throwing an error when i would run this query.
Here is the error
Msg 227, Level 15, State 1, Procedure DDLTRIGGER, Line 6
"Query" is not a valid function, property, or field.
Any clue on this?/
Thanks
-L
|
|
|
|
|
hi
plz help me to solve my problem.
i have two tables A and B
A B
-----------------------------------------------
SRNO STATUS SRNO STATUS
------------------------------------------------
101 A 101 X
102 NULL 102 Y
103 NULL 103 Z
104 B 104 W
------------------------------------------------
I M TRYING FOR A QUERY FOR THE FOLLOWING OUTPUT :
--------------------
SRNO STATUS
-------------------
101 A
102 Y
103 Z
104 B
-----------------
THANKS
-- modified at 10:01 Monday 13th February, 2006
|
|
|
|
|
SELECT A.SRNO, COALESCE(A.STATUS, B.STATUS)
FROM A
INNER JOIN B ON A.SRNO = B.SRNO
COALESCE will return the first non-NULL from its parameters.
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
Cool, very clean and better than my possible suggestion (case when ...)
daniero
|
|
|
|
|
Hello,
I have no idea anymore
Has someone an idea how I can create a backup of my database in SQL Server Express 2005?
I don't know - there is no tool which provide this function. I also haven't the Enterprise Manager.
Is there someone who can recommend a Backuptool?
Thanks for helping...;)
Christoph Scherff
|
|
|
|
|
Microsoft makes a graphical management tool available, SQL Server Management Studio Express[^]. I believe you should be able to make a backup from there. This is currently a Community Technology Preview release; there should be a final supported release available soon.
Otherwise the built-in solution is the BACKUP DATABASE command.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|