|
REMOTE is a Linked Server on HEADOFFICE
When I execute this T-SQL script on HEADOFFICE to test the connection :-
SET XACT_ABORT ON<br />
begin distributed tran<br />
select * from REMOTE.master.sys.sysprocesses<br />
commit tran<br />
SET XACT_ABORT OFF
I get the following error message :-
Msg 8501, Level 16, State 2, Line 1<br />
MSDTC on server 'REMOTE' is unavailable.
Both servers have DTC running and I checked that the firewalls have ports 1433 and 1434 open.
Any ideas would be appreicated.
Steve Jowett
-------------------------
It is offen dangerous to try and see someone else's point of view, without proper training. Douglas Adams (Mostly Harmless)
|
|
|
|
|
Hi,
can any one tell me what is the Difference between SQLSERVER 2000 and SQLSERVER 2005
With Regards,
Anu
|
|
|
|
|
|
|
there is a big difference of 5...
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
i want to delete the record from datagrid using sqlcommandbuilder.getdelete command,
after selecting a pericular record from datagrid the record should be deleted.how it is possible.
weather i have to provide some parameter if yes then what is the syntax to provide .please help me.
|
|
|
|
|
I would like to know how I can set a new value into the triggers inserted recordset. Example: All dates on or before 1/1/1900 are to be set to null. Then a date in the fourth column comes in as 1/1/1900 in the inserted column. I can find out that the value needs to be set, but how can I change it to null before it is actually set in the database?
Thanks,
Leo T. Smith
Program/Analyst Supervisor
|
|
|
|
|
You could use an INSTEAD OF UPDATE trigger that fires when an UPDATE statement is executed against your table. The inserted table would contain details of the changes which were going to be made. You can then examine these values and execute a different UPDATE statement which either updates the fields as they were originally going to be updated, or sets fields to NULL where the value <= 1/1/1900.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
I have a Access Form, with a series of three combo boxes.
Box 1 - City
Box 2 - State
Box 3 - ZIP
When I input the zip code, I want to populate the other two boxes based on the result of the ZIP code. I have a ZIP codee table, which has ZIP, CITY, and a second table that has State.
How should I write the query in order to accomplish this?
Thanks,
|
|
|
|
|
You can obtain the City by doing a simple SELECT on your ZIP Code table, filtering on the ZIP.
You haven't explained how your tables are related. I assume you have a City table with a foreign key to the State table. If so, write a query which joins the ZIP Code, City and State tables and fetches the corresponding State description.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Hello Paul, and thank you for your response.
I need to get better explaining my brainstorming!
Ok, the Zipcode table has Zipcode, City, State Code fields. The State Table has State Code, State Abrieviation, and State Name. The two tables are related by the State Code field.
I would think that if I enter the zip, then perform an after update event that queries the Zipcode table and populates the State field of the form.
So, with the above in mind, would you think that this query would work?
SELECT [ZIP Codes].[City], [States].[State Abbreviation]
FROM [ZIP Codes], States
WHERE [Zip Codes].[ZIP Code] = '44107' and
[States].[State Code] = (SELECT [ZIP Codes].[State Code] FROM [ZIP Codes] WHERE [ZIP Codes].[ZIP Code] = '44107')
ORDER BY [ZIP Codes].[ZIP Code];
Thanks,
|
|
|
|
|
solutionsville wrote: SELECT [ZIP Codes].[City], [States].[State Abbreviation]
FROM [ZIP Codes], States
WHERE [Zip Codes].[ZIP Code] = '44107' and
[States].[State Code] = (SELECT [ZIP Codes].[State Code] FROM [ZIP Codes] WHERE [ZIP Codes].[ZIP Code] = '44107')
ORDER BY [ZIP Codes].[ZIP Code];
Your query is overly complicated and can be simplified to:
SELECT [ZIP Codes].[City], [States].[State Abbreviation]
FROM [ZIP Codes]
INNER JOIN [States]
ON [ZIP Codes].[State Code] = [States].[State Code]
WHERE [ZIP Codes].[ZIP Code] = '44107'
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Thanks Paul.
I Appreciate it.
Brian
|
|
|
|
|
Here's a tip for you. Use the Access Query design to do you table links etc, then look at query as SQL Statement and there's the required code.
Steve Jowett
-------------------------
It is offen dangerous to try and see someone else's point of view, without proper training. Douglas Adams (Mostly Harmless)
|
|
|
|
|
I want use ADO to get the field’s data type not the ADO’s data type but the database’s data type like ‘varchar’,’ char’.
|
|
|
|
|
You can obtain field metadata by querying the INFORMATION_SCHEMA.COLUMNS system view in the master database on your SQL Server.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
No,I mean not only the SQL Server but also other kinds of database.
|
|
|
|
|
I doubt that this is possible.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Hi,
Sql server does not support ntext in function.
Is there any way to use ntext in function?
I have a condition where a ntext column value if not exist in one table then i have to select it fom another table.
Thanks in Advance
|
|
|
|
|
I wasn't aware of this limitation with the NTEXT datatype. So maybe I'm barking up the wrong tree here, but have you tried using the COALESCE(value_which_may_be_null, value_to_return_in_case_of_first_value_being_null) function? There's also the CASE statement, if you want to check for an empty string as opposed to a NULL. I've been coding in Orcle for some months now, so apologies if i've missed the point of your question.
|
|
|
|
|
Hey
Currently I am using SQL Server, and to get the stored procedure's return value I am writing (c++):
VARIANT v;
v.vt = VT_I2;
v.intVal=0;
ptrCom->Parameters->Item[v]->Value;
What I want to know is, if this command will get the return value in Oracle as well (does the return value is 0, just like in SQL Server)?
Thanks in advance!
|
|
|
|
|
sir actually i am using asp.net with c#.
in my web application i take farpoint spreadsheet control.
On that control i want treeview.
-SectorName
Aggriculture
Company name
NagarjunFertilizer
Auto
TataMotors
Honda
IT
Infosys
Wipro
like this Treeview i want on farpoint spreadsheet.
i have 3 tables
1.tSectorMaster
SectorCode(PK)
Description
2.tAssetMaster
AssetCode(PK)
Descriptionlong
3.tAssetSectorMap
AssetSectorCode(PK)
SectorCode(FK)
AssetCode(FK)
and i want
SectorName
Description
Descriptionlong
Description
Descriptionlong
Descriptionlong
Description
Descriptionlong
Descriptionlong
|
|
|
|
|
OK - so you're using ASP.NET, but you're asking in the SQL forum how to use a third party ASP.NET control ? I'd say the people who sold you the control is who you should be asking, and if they have a SQL forum, it's the wrong place to ask, there, too..
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
|
I have some sql Update command error.
I get the following error message when i run my project.
" ERROR [42000] [Microsoft] [ODBC Microsoft Access Driver] Syntax error in UPDATE statement "
some of my code is following....
Dim CW As Integer
Dim RCW As Integer
------------------------------------------------------------------------------------------------------------------------
Dim level As String = CStr(ComboBox1.SelectedItem.ToString)
Dim exercise As String = CStr(ComboBox2.SelectedItem.ToString)
Dim FWds As String = CStr(lblFalseWords.Text)
Dim SpanTime As String = CStr(hour )
"UPDATE tblSave SET Level=' " & level & " ',Exercise=' " & exercise & " ',CWords=" & CW & ",FWords=' " & FWds & " ',WPM=" & RCW & ",SpanTime=' " & SpanTime & " ' WHERE tblSave.UserName=' " & CurrentUser & " ' "
Please tell me some suggestion.....
|
|
|
|