Hi All, does anyone know if it's possible to utilise a .NET class
library from Excel 97 ? I've tried but receive a runtime error
-2146232576 which means nothing to me, my class is shown below, I've
placed the assembly into the GAC and registered it using RegAsm all to
no avail
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Runtime.InteropServices;
namespace CallingCSharpFromWord97
{
[ComVisible(true)]
public class PJKWordClass
{
public TextWriter tw = null;
public PJKWordClass()
{
}
public void WriteLogFile(string msg)
{
tw = new StreamWriter("c:\\PJKCalledFromWord97.log", true);
tw.WriteLine(String.Format("This file was created by C# which was
called from a COM client {0} at
{1}",msg,DateTime.Now.ToLongDateString()));
tw.Close();
}
}
}
I can reference the assembly in Excel, but when run, it bombs on the
CreateObject line ( with the error number shown above )
Dim oCSharp As CallingCSharpFromWord97.PJKWordClass
Set oCSharp = CreateObject("CallingCSharpFromWord97.PJKWordClass")
regardsPete Kane wrote:
> Hi All, does anyone know if it's possible to utilise a .NET class
> library from Excel 97 ? I've tried but receive a runtime error
> -2146232576 which means nothing to me, my class is shown below, I've
> placed the assembly into the GAC and registered it using RegAsm all to
> no avail
> using System;
> using System.Collections.Generic;
> using System.Text;
> using System.IO;
> using System.Runtime.InteropServices;
> namespace CallingCSharpFromWord97
> {
> [ComVisible(true)]
> public class PJKWordClass
> {
> public TextWriter tw = null;
> public PJKWordClass()
> {
> }
> public void WriteLogFile(string msg)
> {
> tw = new StreamWriter("c:\\PJKCalledFromWord97.log", true);
> tw.WriteLine(String.Format("This file was created by C# which was
> called from a COM client {0} at
> {1}",msg,DateTime.Now.ToLongDateString()));
> tw.Close();
> }
> }
> }
>
> I can reference the assembly in Excel, but when run, it bombs on the
> CreateObject line ( with the error number shown above )
> Dim oCSharp As CallingCSharpFromWord97.PJKWordClass
> Set oCSharp = CreateObject("CallingCSharpFromWord97.PJKWordClass")
> regards
>
Sorry posted to wrong group :-)sql
Showing posts with label library. Show all posts
Showing posts with label library. Show all posts
Sunday, March 25, 2012
Monday, February 13, 2012
about identifier
in the MSDN
http://msdn2.microsoft.com/en-us/library/ms175874.aspx
it says that
The rules for the format of regular identifiers depend on the database
compatibility level. This level can be set by using sp_dbcmptlevel.
When the compatibility level is 90, the following rules apply:
1. The first character must be one of the following:
* A letter as defined by the Unicode Standard 3.2. The
Unicode definition of letters includes Latin characters from a through
z, from A through Z, and also letter characters from other languages.
* The underscore (_), at sign (@.), or number sign (#).
Certain symbols at the beginning of an identifier have
special meaning in SQL Server. A regular identifier that starts with
the at sign always denotes a local variable or parameter and cannot be
used as the name of any other type of object. An identifier that starts
with a number sign denotes a temporary table or procedure. An
identifier that starts with double number signs (##) denotes a global
temporary object. Although the number sign or double number sign
characters can be used to begin the names of other types of objects, we
do not recommend this practice.
Some Transact-SQL functions have names that start with
double at signs (@.@.). To avoid confusion with these functions, you
should not use names that start with @.@..
2. Subsequent characters can include the following:
* Letters as defined in the Unicode Standard 3.2.
* Decimal numbers from either Basic Latin or other national
scripts.
* The at sign, dollar sign ($), number sign, or underscore.
3. The identifier must not be a Transact-SQL reserved word. SQL
Server reserves both the uppercase and lowercase versions of reserved
words.
4. Embedded spaces or special characters are not allowed.
When identifiers are used in Transact-SQL statements, the identifiers
that do not comply with these rules must be delimited by double
quotation marks or brackets.
so, why can I create a database with name "!nihao nihao" (it contradict
with item 1 and 4 above )?
Thanks
Because, as the paragraph immediately after #4 explains, using double
quotation marks is a way to 'override' the normal naming requirements.
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"Benny" <wuyuebing@.gmail.com> wrote in message
news:1163388171.249209.74300@.b28g2000cwb.googlegro ups.com...
> in the MSDN
> http://msdn2.microsoft.com/en-us/library/ms175874.aspx
> it says that
> --
> The rules for the format of regular identifiers depend on the database
> compatibility level. This level can be set by using sp_dbcmptlevel.
> When the compatibility level is 90, the following rules apply:
> 1. The first character must be one of the following:
> * A letter as defined by the Unicode Standard 3.2. The
> Unicode definition of letters includes Latin characters from a through
> z, from A through Z, and also letter characters from other languages.
> * The underscore (_), at sign (@.), or number sign (#).
> Certain symbols at the beginning of an identifier have
> special meaning in SQL Server. A regular identifier that starts with
> the at sign always denotes a local variable or parameter and cannot be
> used as the name of any other type of object. An identifier that starts
> with a number sign denotes a temporary table or procedure. An
> identifier that starts with double number signs (##) denotes a global
> temporary object. Although the number sign or double number sign
> characters can be used to begin the names of other types of objects, we
> do not recommend this practice.
> Some Transact-SQL functions have names that start with
> double at signs (@.@.). To avoid confusion with these functions, you
> should not use names that start with @.@..
> 2. Subsequent characters can include the following:
> * Letters as defined in the Unicode Standard 3.2.
> * Decimal numbers from either Basic Latin or other national
> scripts.
> * The at sign, dollar sign ($), number sign, or underscore.
> 3. The identifier must not be a Transact-SQL reserved word. SQL
> Server reserves both the uppercase and lowercase versions of reserved
> words.
> 4. Embedded spaces or special characters are not allowed.
> When identifiers are used in Transact-SQL statements, the identifiers
> that do not comply with these rules must be delimited by double
> quotation marks or brackets.
> so, why can I create a database with name "!nihao nihao" (it contradict
> with item 1 and 4 above )?
> Thanks
>
http://msdn2.microsoft.com/en-us/library/ms175874.aspx
it says that
The rules for the format of regular identifiers depend on the database
compatibility level. This level can be set by using sp_dbcmptlevel.
When the compatibility level is 90, the following rules apply:
1. The first character must be one of the following:
* A letter as defined by the Unicode Standard 3.2. The
Unicode definition of letters includes Latin characters from a through
z, from A through Z, and also letter characters from other languages.
* The underscore (_), at sign (@.), or number sign (#).
Certain symbols at the beginning of an identifier have
special meaning in SQL Server. A regular identifier that starts with
the at sign always denotes a local variable or parameter and cannot be
used as the name of any other type of object. An identifier that starts
with a number sign denotes a temporary table or procedure. An
identifier that starts with double number signs (##) denotes a global
temporary object. Although the number sign or double number sign
characters can be used to begin the names of other types of objects, we
do not recommend this practice.
Some Transact-SQL functions have names that start with
double at signs (@.@.). To avoid confusion with these functions, you
should not use names that start with @.@..
2. Subsequent characters can include the following:
* Letters as defined in the Unicode Standard 3.2.
* Decimal numbers from either Basic Latin or other national
scripts.
* The at sign, dollar sign ($), number sign, or underscore.
3. The identifier must not be a Transact-SQL reserved word. SQL
Server reserves both the uppercase and lowercase versions of reserved
words.
4. Embedded spaces or special characters are not allowed.
When identifiers are used in Transact-SQL statements, the identifiers
that do not comply with these rules must be delimited by double
quotation marks or brackets.
so, why can I create a database with name "!nihao nihao" (it contradict
with item 1 and 4 above )?
Thanks
Because, as the paragraph immediately after #4 explains, using double
quotation marks is a way to 'override' the normal naming requirements.
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"Benny" <wuyuebing@.gmail.com> wrote in message
news:1163388171.249209.74300@.b28g2000cwb.googlegro ups.com...
> in the MSDN
> http://msdn2.microsoft.com/en-us/library/ms175874.aspx
> it says that
> --
> The rules for the format of regular identifiers depend on the database
> compatibility level. This level can be set by using sp_dbcmptlevel.
> When the compatibility level is 90, the following rules apply:
> 1. The first character must be one of the following:
> * A letter as defined by the Unicode Standard 3.2. The
> Unicode definition of letters includes Latin characters from a through
> z, from A through Z, and also letter characters from other languages.
> * The underscore (_), at sign (@.), or number sign (#).
> Certain symbols at the beginning of an identifier have
> special meaning in SQL Server. A regular identifier that starts with
> the at sign always denotes a local variable or parameter and cannot be
> used as the name of any other type of object. An identifier that starts
> with a number sign denotes a temporary table or procedure. An
> identifier that starts with double number signs (##) denotes a global
> temporary object. Although the number sign or double number sign
> characters can be used to begin the names of other types of objects, we
> do not recommend this practice.
> Some Transact-SQL functions have names that start with
> double at signs (@.@.). To avoid confusion with these functions, you
> should not use names that start with @.@..
> 2. Subsequent characters can include the following:
> * Letters as defined in the Unicode Standard 3.2.
> * Decimal numbers from either Basic Latin or other national
> scripts.
> * The at sign, dollar sign ($), number sign, or underscore.
> 3. The identifier must not be a Transact-SQL reserved word. SQL
> Server reserves both the uppercase and lowercase versions of reserved
> words.
> 4. Embedded spaces or special characters are not allowed.
> When identifiers are used in Transact-SQL statements, the identifiers
> that do not comply with these rules must be delimited by double
> quotation marks or brackets.
> so, why can I create a database with name "!nihao nihao" (it contradict
> with item 1 and 4 above )?
> Thanks
>
about identifier
in the MSDN
http://msdn2.microsoft.com/en-us/library/ms175874.aspx
it says that
--
The rules for the format of regular identifiers depend on the database
compatibility level. This level can be set by using sp_dbcmptlevel.
When the compatibility level is 90, the following rules apply:
1. The first character must be one of the following:
* A letter as defined by the Unicode Standard 3.2. The
Unicode definition of letters includes Latin characters from a through
z, from A through Z, and also letter characters from other languages.
* The underscore (_), at sign (@.), or number sign (#).
Certain symbols at the beginning of an identifier have
special meaning in SQL Server. A regular identifier that starts with
the at sign always denotes a local variable or parameter and cannot be
used as the name of any other type of object. An identifier that starts
with a number sign denotes a temporary table or procedure. An
identifier that starts with double number signs (##) denotes a global
temporary object. Although the number sign or double number sign
characters can be used to begin the names of other types of objects, we
do not recommend this practice.
Some Transact-SQL functions have names that start with
double at signs (@.@.). To avoid confusion with these functions, you
should not use names that start with @.@..
2. Subsequent characters can include the following:
* Letters as defined in the Unicode Standard 3.2.
* Decimal numbers from either Basic Latin or other national
scripts.
* The at sign, dollar sign ($), number sign, or underscore.
3. The identifier must not be a Transact-SQL reserved word. SQL
Server reserves both the uppercase and lowercase versions of reserved
words.
4. Embedded spaces or special characters are not allowed.
When identifiers are used in Transact-SQL statements, the identifiers
that do not comply with these rules must be delimited by double
quotation marks or brackets.
---
so, why can I create a database with name "!nihao nihao" (it contradict
with item 1 and 4 above )?
ThanksBecause, as the paragraph immediately after #4 explains, using double
quotation marks is a way to 'override' the normal naming requirements.
--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"Benny" <wuyuebing@.gmail.com> wrote in message
news:1163388171.249209.74300@.b28g2000cwb.googlegroups.com...
> in the MSDN
> http://msdn2.microsoft.com/en-us/library/ms175874.aspx
> it says that
> --
> The rules for the format of regular identifiers depend on the database
> compatibility level. This level can be set by using sp_dbcmptlevel.
> When the compatibility level is 90, the following rules apply:
> 1. The first character must be one of the following:
> * A letter as defined by the Unicode Standard 3.2. The
> Unicode definition of letters includes Latin characters from a through
> z, from A through Z, and also letter characters from other languages.
> * The underscore (_), at sign (@.), or number sign (#).
> Certain symbols at the beginning of an identifier have
> special meaning in SQL Server. A regular identifier that starts with
> the at sign always denotes a local variable or parameter and cannot be
> used as the name of any other type of object. An identifier that starts
> with a number sign denotes a temporary table or procedure. An
> identifier that starts with double number signs (##) denotes a global
> temporary object. Although the number sign or double number sign
> characters can be used to begin the names of other types of objects, we
> do not recommend this practice.
> Some Transact-SQL functions have names that start with
> double at signs (@.@.). To avoid confusion with these functions, you
> should not use names that start with @.@..
> 2. Subsequent characters can include the following:
> * Letters as defined in the Unicode Standard 3.2.
> * Decimal numbers from either Basic Latin or other national
> scripts.
> * The at sign, dollar sign ($), number sign, or underscore.
> 3. The identifier must not be a Transact-SQL reserved word. SQL
> Server reserves both the uppercase and lowercase versions of reserved
> words.
> 4. Embedded spaces or special characters are not allowed.
> When identifiers are used in Transact-SQL statements, the identifiers
> that do not comply with these rules must be delimited by double
> quotation marks or brackets.
> ---
> so, why can I create a database with name "!nihao nihao" (it contradict
> with item 1 and 4 above )?
> Thanks
>
http://msdn2.microsoft.com/en-us/library/ms175874.aspx
it says that
--
The rules for the format of regular identifiers depend on the database
compatibility level. This level can be set by using sp_dbcmptlevel.
When the compatibility level is 90, the following rules apply:
1. The first character must be one of the following:
* A letter as defined by the Unicode Standard 3.2. The
Unicode definition of letters includes Latin characters from a through
z, from A through Z, and also letter characters from other languages.
* The underscore (_), at sign (@.), or number sign (#).
Certain symbols at the beginning of an identifier have
special meaning in SQL Server. A regular identifier that starts with
the at sign always denotes a local variable or parameter and cannot be
used as the name of any other type of object. An identifier that starts
with a number sign denotes a temporary table or procedure. An
identifier that starts with double number signs (##) denotes a global
temporary object. Although the number sign or double number sign
characters can be used to begin the names of other types of objects, we
do not recommend this practice.
Some Transact-SQL functions have names that start with
double at signs (@.@.). To avoid confusion with these functions, you
should not use names that start with @.@..
2. Subsequent characters can include the following:
* Letters as defined in the Unicode Standard 3.2.
* Decimal numbers from either Basic Latin or other national
scripts.
* The at sign, dollar sign ($), number sign, or underscore.
3. The identifier must not be a Transact-SQL reserved word. SQL
Server reserves both the uppercase and lowercase versions of reserved
words.
4. Embedded spaces or special characters are not allowed.
When identifiers are used in Transact-SQL statements, the identifiers
that do not comply with these rules must be delimited by double
quotation marks or brackets.
---
so, why can I create a database with name "!nihao nihao" (it contradict
with item 1 and 4 above )?
ThanksBecause, as the paragraph immediately after #4 explains, using double
quotation marks is a way to 'override' the normal naming requirements.
--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"Benny" <wuyuebing@.gmail.com> wrote in message
news:1163388171.249209.74300@.b28g2000cwb.googlegroups.com...
> in the MSDN
> http://msdn2.microsoft.com/en-us/library/ms175874.aspx
> it says that
> --
> The rules for the format of regular identifiers depend on the database
> compatibility level. This level can be set by using sp_dbcmptlevel.
> When the compatibility level is 90, the following rules apply:
> 1. The first character must be one of the following:
> * A letter as defined by the Unicode Standard 3.2. The
> Unicode definition of letters includes Latin characters from a through
> z, from A through Z, and also letter characters from other languages.
> * The underscore (_), at sign (@.), or number sign (#).
> Certain symbols at the beginning of an identifier have
> special meaning in SQL Server. A regular identifier that starts with
> the at sign always denotes a local variable or parameter and cannot be
> used as the name of any other type of object. An identifier that starts
> with a number sign denotes a temporary table or procedure. An
> identifier that starts with double number signs (##) denotes a global
> temporary object. Although the number sign or double number sign
> characters can be used to begin the names of other types of objects, we
> do not recommend this practice.
> Some Transact-SQL functions have names that start with
> double at signs (@.@.). To avoid confusion with these functions, you
> should not use names that start with @.@..
> 2. Subsequent characters can include the following:
> * Letters as defined in the Unicode Standard 3.2.
> * Decimal numbers from either Basic Latin or other national
> scripts.
> * The at sign, dollar sign ($), number sign, or underscore.
> 3. The identifier must not be a Transact-SQL reserved word. SQL
> Server reserves both the uppercase and lowercase versions of reserved
> words.
> 4. Embedded spaces or special characters are not allowed.
> When identifiers are used in Transact-SQL statements, the identifiers
> that do not comply with these rules must be delimited by double
> quotation marks or brackets.
> ---
> so, why can I create a database with name "!nihao nihao" (it contradict
> with item 1 and 4 above )?
> Thanks
>
about identifier
in the MSDN
http://msdn2.microsoft.com/en-us/library/ms175874.aspx
it says that
--
The rules for the format of regular identifiers depend on the database
compatibility level. This level can be set by using sp_dbcmptlevel.
When the compatibility level is 90, the following rules apply:
1. The first character must be one of the following:
* A letter as defined by the Unicode Standard 3.2. The
Unicode definition of letters includes Latin characters from a through
z, from A through Z, and also letter characters from other languages.
* The underscore (_), at sign (@.), or number sign (#).
Certain symbols at the beginning of an identifier have
special meaning in SQL Server. A regular identifier that starts with
the at sign always denotes a local variable or parameter and cannot be
used as the name of any other type of object. An identifier that starts
with a number sign denotes a temporary table or procedure. An
identifier that starts with double number signs (##) denotes a global
temporary object. Although the number sign or double number sign
characters can be used to begin the names of other types of objects, we
do not recommend this practice.
Some Transact-SQL functions have names that start with
double at signs (@.@.). To avoid confusion with these functions, you
should not use names that start with @.@..
2. Subsequent characters can include the following:
* Letters as defined in the Unicode Standard 3.2.
* Decimal numbers from either Basic Latin or other national
scripts.
* The at sign, dollar sign ($), number sign, or underscore.
3. The identifier must not be a Transact-SQL reserved word. SQL
Server reserves both the uppercase and lowercase versions of reserved
words.
4. Embedded spaces or special characters are not allowed.
When identifiers are used in Transact-SQL statements, the identifiers
that do not comply with these rules must be delimited by double
quotation marks or brackets.
---
so, why can I create a database with name "!nihao nihao" (it contradict
with item 1 and 4 above )?
ThanksBecause, as the paragraph immediately after #4 explains, using double
quotation marks is a way to 'override' the normal naming requirements.
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"Benny" <wuyuebing@.gmail.com> wrote in message
news:1163388171.249209.74300@.b28g2000cwb.googlegroups.com...
> in the MSDN
> http://msdn2.microsoft.com/en-us/library/ms175874.aspx
> it says that
> --
> The rules for the format of regular identifiers depend on the database
> compatibility level. This level can be set by using sp_dbcmptlevel.
> When the compatibility level is 90, the following rules apply:
> 1. The first character must be one of the following:
> * A letter as defined by the Unicode Standard 3.2. The
> Unicode definition of letters includes Latin characters from a through
> z, from A through Z, and also letter characters from other languages.
> * The underscore (_), at sign (@.), or number sign (#).
> Certain symbols at the beginning of an identifier have
> special meaning in SQL Server. A regular identifier that starts with
> the at sign always denotes a local variable or parameter and cannot be
> used as the name of any other type of object. An identifier that starts
> with a number sign denotes a temporary table or procedure. An
> identifier that starts with double number signs (##) denotes a global
> temporary object. Although the number sign or double number sign
> characters can be used to begin the names of other types of objects, we
> do not recommend this practice.
> Some Transact-SQL functions have names that start with
> double at signs (@.@.). To avoid confusion with these functions, you
> should not use names that start with @.@..
> 2. Subsequent characters can include the following:
> * Letters as defined in the Unicode Standard 3.2.
> * Decimal numbers from either Basic Latin or other national
> scripts.
> * The at sign, dollar sign ($), number sign, or underscore.
> 3. The identifier must not be a Transact-SQL reserved word. SQL
> Server reserves both the uppercase and lowercase versions of reserved
> words.
> 4. Embedded spaces or special characters are not allowed.
> When identifiers are used in Transact-SQL statements, the identifiers
> that do not comply with these rules must be delimited by double
> quotation marks or brackets.
> ---
> so, why can I create a database with name "!nihao nihao" (it contradict
> with item 1 and 4 above )?
> Thanks
>
http://msdn2.microsoft.com/en-us/library/ms175874.aspx
it says that
--
The rules for the format of regular identifiers depend on the database
compatibility level. This level can be set by using sp_dbcmptlevel.
When the compatibility level is 90, the following rules apply:
1. The first character must be one of the following:
* A letter as defined by the Unicode Standard 3.2. The
Unicode definition of letters includes Latin characters from a through
z, from A through Z, and also letter characters from other languages.
* The underscore (_), at sign (@.), or number sign (#).
Certain symbols at the beginning of an identifier have
special meaning in SQL Server. A regular identifier that starts with
the at sign always denotes a local variable or parameter and cannot be
used as the name of any other type of object. An identifier that starts
with a number sign denotes a temporary table or procedure. An
identifier that starts with double number signs (##) denotes a global
temporary object. Although the number sign or double number sign
characters can be used to begin the names of other types of objects, we
do not recommend this practice.
Some Transact-SQL functions have names that start with
double at signs (@.@.). To avoid confusion with these functions, you
should not use names that start with @.@..
2. Subsequent characters can include the following:
* Letters as defined in the Unicode Standard 3.2.
* Decimal numbers from either Basic Latin or other national
scripts.
* The at sign, dollar sign ($), number sign, or underscore.
3. The identifier must not be a Transact-SQL reserved word. SQL
Server reserves both the uppercase and lowercase versions of reserved
words.
4. Embedded spaces or special characters are not allowed.
When identifiers are used in Transact-SQL statements, the identifiers
that do not comply with these rules must be delimited by double
quotation marks or brackets.
---
so, why can I create a database with name "!nihao nihao" (it contradict
with item 1 and 4 above )?
ThanksBecause, as the paragraph immediately after #4 explains, using double
quotation marks is a way to 'override' the normal naming requirements.
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"Benny" <wuyuebing@.gmail.com> wrote in message
news:1163388171.249209.74300@.b28g2000cwb.googlegroups.com...
> in the MSDN
> http://msdn2.microsoft.com/en-us/library/ms175874.aspx
> it says that
> --
> The rules for the format of regular identifiers depend on the database
> compatibility level. This level can be set by using sp_dbcmptlevel.
> When the compatibility level is 90, the following rules apply:
> 1. The first character must be one of the following:
> * A letter as defined by the Unicode Standard 3.2. The
> Unicode definition of letters includes Latin characters from a through
> z, from A through Z, and also letter characters from other languages.
> * The underscore (_), at sign (@.), or number sign (#).
> Certain symbols at the beginning of an identifier have
> special meaning in SQL Server. A regular identifier that starts with
> the at sign always denotes a local variable or parameter and cannot be
> used as the name of any other type of object. An identifier that starts
> with a number sign denotes a temporary table or procedure. An
> identifier that starts with double number signs (##) denotes a global
> temporary object. Although the number sign or double number sign
> characters can be used to begin the names of other types of objects, we
> do not recommend this practice.
> Some Transact-SQL functions have names that start with
> double at signs (@.@.). To avoid confusion with these functions, you
> should not use names that start with @.@..
> 2. Subsequent characters can include the following:
> * Letters as defined in the Unicode Standard 3.2.
> * Decimal numbers from either Basic Latin or other national
> scripts.
> * The at sign, dollar sign ($), number sign, or underscore.
> 3. The identifier must not be a Transact-SQL reserved word. SQL
> Server reserves both the uppercase and lowercase versions of reserved
> words.
> 4. Embedded spaces or special characters are not allowed.
> When identifiers are used in Transact-SQL statements, the identifiers
> that do not comply with these rules must be delimited by double
> quotation marks or brackets.
> ---
> so, why can I create a database with name "!nihao nihao" (it contradict
> with item 1 and 4 above )?
> Thanks
>
Subscribe to:
Posts (Atom)