|
psasidisrcum wrote: "SELECT dbo_Table_1.* FROM dbo_Table_1
I'm not exactly sure, but isn't it odd to SELECT Table1 FROM Table1? You also have a period after the first dbp_Table_1 which may be causing fits.
Jerry
"When I get a little money, I buy books and if any is left, I buy food and clothes." --Erasmus
|
|
|
|
|
Jerry Hammond wrote: I'm not exactly sure, but isn't it odd to SELECT Table1 FROM Table1?
He isn't he's selecting dbo_Table1.* which is a valid notation to mean all columns from dbo_Table1 - It is most commonly used when there are joined tables - It is redundant if there is only one table in the select because SELECT * would be just as effective.
Jerry Hammond wrote: You also have a period after the first dbp_Table_1 which may be causing fits.
The dot is to allow you to more fully qualify a name if there is some ambiguity. Here the notation is reduntant because there is no ambiguity. The full notation is:
[server].[database].[owner].[table].[column]
|
|
|
|
|
Colin Angus Mackay wrote: He isn't he's selecting dbo_Table1.* which is a valid notation to mean all columns from dbo_Table1 - It is most commonly used when there are joined tables - It is redundant if there is only one table in the select because SELECT * would be just as effective.
Cool. That is good to know. He does say, "yes, I verified that the table actually does exist in the DB)".
Colin Angus Mackay wrote: The dot is to allow you to more fully qualify a name if there is some ambiguity. Here the notation is reduntant because there is no ambiguity. The full notation is:
[server].[database].[owner].[table].[column]
Right. That would mean--I assume--that when he writes dbo_Table_1. he is selecting his Server?
"When I get a little money, I buy books and if any is left, I buy food and clothes." --Erasmus
|
|
|
|
|
Jerry Hammond wrote: Right. That would mean--I assume--that when he writes dbo_Table_1. he is selecting his Server?
No, it goes the other way around. The column is the mandatory bit, so it will parse as if the colum is the last thing and work back from there.
Valid sequences, when expecting a column name, are therefore:
[server].[database].[owner].[table].[column]
[database].[owner].[table].[column]
[owner].[table].[column]
[table].[column]
[column]
Valid sequences, when expecting a table name, are:
[server].[database].[owner].[table]
[database].[owner].[table]
[owner].[table]
[table]
(Note the owner name, in both cases, can be omitted when it is the dbo, so you'd get the two dots with nothing inbetween. e.g. mydatabase..mytable)
|
|
|
|
|
Cool beans, Colin. Thanks for clearing that up for me.
"When I get a little money, I buy books and if any is left, I buy food and clothes." --Erasmus
|
|
|
|
|
psasidisrcum wrote: Dim cnnSQL As New ADODB.Connection
Set cnnSQL = New ADODB.Connection
Are you sure the root cause isn’t the double initialize of cnnSQL?
Dim cnnSQL As ADODB.Connection
Set cnnSQL = New ADODB.Connection
psasidisrcum wrote: dataRS.Open "SELECT * FROM dbo_Table_1", cnnSQL, adOpenStatic, adLockOptimistic
I'd love to help, but unfortunatley I have prior commitments monitoring the length of my grass. :Andrew Bleakley:
|
|
|
|
|
S Douglas wrote: Are you sure the root cause isn’t the double initialize of cnnSQL?
While the double initialisation is redundant it is unlikely to be the cause of the problem because the second connection is constructed over the first before anything is done with the first connection.
|
|
|
|
|
Colin Angus Mackay wrote: it is unlikely to be the cause of the problem because the second connection is constructed over the first before anything is done with the first connection.
CP choked on my post and I was way to lazy (well tired) to retype it all out again. I have had issues with simple errors of that nature. Nothing big just flaky behavior by the object.
I'd love to help, but unfortunatley I have prior commitments monitoring the length of my grass. :Andrew Bleakley:
|
|
|
|
|
psasidisrcum wrote: The code fails though, on the last line with message
"Invalid object name 'dbo_Table_1'"
Are you sure you really have a table name called dbo_Table_1? Are you sure it isn't dbo.Table_1? (i.e. there is a dot between dbo and Table_1 rather than an underscore)
|
|
|
|
|
I have a trouble with using DiffGrams.
All I need is to update MSSQL 2000 table using DiffGram.
I wrote code but it crashes Searching MANY documents didn't gave me an answer .
Please, could anyone help me?
<br />
SqlXmlCommand cmd = new SqlXmlCommand(connectionStr + ";Provider=SQLOLEDB");<br />
cmd.CommandType = SqlXmlCommandType.DiffGram;<br />
cmd.Namespaces = "xmlns:x='http://tempuri.org/mydata.xsd'";<br />
cmd.SchemaPath = Application.StartupPath + @"\mydata.xsd";<br />
cmd.CommandText = "x:SampleTable"; <br />
SqlXmlAdapter ad = new SqlXmlAdapter(cmd);<br />
ad.Update(dataSet);<br />
P.S. Why Microsoft help is so small?
|
|
|
|
|
Hey people, does anybody know how to use DiffGrams?
|
|
|
|
|
I've been looking around for approach recommendations on how to best update the code for an SQL Server 2005 user defined type written in C#. You can't deploy the type if it is 'in use' - for example, if a field in the database is declared to be of the type of the UDT.
Of course, I usually write perfect code that forsees all future possibilities. ... but on the off chance I might need to update the managed code into a database with real production stuff in it - I'm looking for the best approach to deploy updates to the UDT.
So far, the best I've figured out is that one tests the heck out of the string to type and type to string conversions, and when you want to deploy the update, you change all the UDT columns into strings (which converts the data in place, and frees the assembly from use) deploy the update, and then change all the columns back to the UDT.
Anyone have anything less brute forceish to recommend?
Mike
---------------------
www.opusedge.com
|
|
|
|
|
Hi all,
What are the Features encorparated in SQL Server2005 ?
Aditya Chitti
|
|
|
|
|
|
Go here[^] type http://msdn2.microsoft.com/en-us/sql/default.aspx into the search box. You should be able to quickly and with little trouble discover all the features of SQL Server 2005.
"When I get a little money, I buy books and if any is left, I buy food and clothes." --Erasmus
|
|
|
|
|
I suggest that you visit the MSDN site and search
You will find all features listed.
if (ToErr == Human.Nature)
{
Forgive = Divine;
}
|
|
|
|
|
Hi all,
How to install Recruitment Database in SQL Server 2000.
Please help me out.
Aditya Chitti
|
|
|
|
|
Since we don't know anything about this "Recruitment Database" we can't really help you. Perhaps you should speak to a qualified representative of the company that supplied it.
|
|
|
|
|
Hi all,
How to write a Query to list all the Records in the perticular Table. Please help me out.
Aditya Chitti
|
|
|
|
|
"select * from [tablename]"
|
|
|
|
|
Hi all,
how to query a SqL server and retrieve the Records.
Please help me out.
Aditya Chitti
|
|
|
|
|
aditya chitti wrote: how to query a SqL server and retrieve the Records.
SELECT {column names} FROM {table name}
However, I think you probably want more than that - You'll have to be more specific about your requirements.
|
|
|
|
|
Very simple question:
I have SQL 2000 installed, but don't seem to have a procedure sp_add_job:
...
EXEC sp_add_job
go
....
Msg 2812, Level 16, State 62, Server PEER170, Line 1
Could not find stored procedure 'sp_add_job'.
...
what have I missed?
cheers,
Neil
|
|
|
|
|
This proc is in msdb, not master. did you drop msdb?
|
|
|
|
|
Nope, just didn't realise it was located there.
Thanks for your help.
cheers,
Neil
|
|
|
|