|
I got the answer . deleted table contains the old record and the inserted table contains the newer one for update operation trigger.
Regards,
Shah Adarsh
|
|
|
|
|
Hi:
I am connecting to my SQL server from my windows application localy using either SQLConnection or ODBCConnection and they are working fine but when i try to connect to the server from another PC in the Lan i cannot connect through SQLConnection from my application.
but what have i tried is to connect using odbcConnection and ODBCComand and it connected normally.
What Do i need to setup in the client computer So it Can connect from the Windows Application Normally By using SQL Connection and SQLCommands?
Do I need to setup:
1- A new ODBC System DSN with a SQL Server Driver!!
2- SQL Service Manager (How Do I Get It)
3- Define a new DB user for Clients (I am using it with ODBC Already)
4- Connection string in my application (I am using "Data Source=jedfin-nb0077;Initial Catalog=inventory;User ID=sharifin")
5-In the FORM in QUERY ("SELECT Count(*) FROM [jedfin-nb0077].inventory.sharifin.inventory_item")
Please Help and Thanks in Advance.
|
|
|
|
|
I have written a store procedure to insert a record which contains a parameter that contains loginname which is of type string. i want to trim this parameter in store procedure.
can any one help me in how to do this.
thnx.
|
|
|
|
|
LTRIM()[^]
RTRIM()[^]
SET @YourParam = LTRIM(RTRIM(@YourParam))
Jon Sagara
Look at him. He runs like a Welshman. Doesn't he run like a Welshman? Doesn't he? I think he runs like a Welshman.
Sagara.org | Blog | My Articles
|
|
|
|
|
Thanks for the suggestions, Jon
I tried it and my problem got solved.
Praveen.
|
|
|
|
|
I'm trying to create a view from the Visual Studio Server Explorer. One table I want to include belongs to a different database. When creating a view it only allows you to pick tables and views from within the database your working in. How can I pick a table from a different database for my view?
Thanks for any help on the matter.
|
|
|
|
|
Hi there. You can fully qualify each table with the syntax database.schema.table. For example, to fully qualify the Categories table in the Northwind database, you can use Northwind.dbo.Categories .
|
|
|
|
|
How do you do that within the Server Explorer? Thanks.
|
|
|
|
|
Does it work to make sure "Show SQL Pane" is turned on, then type in the fully qualified name in the sql itself?
|
|
|
|
|
Anyone can teach me how to connect two or more pc sql server together in a local area network?
chung
|
|
|
|
|
Please put a little more effort into your question and I will try to answer...
What type of connection?
What is the expected use?
Is the a fault tolerance question?
Most important, what have you tried???
When people make you see red, be thankful your not colour blind.
|
|
|
|
|
Sorry, i m still new in sql server.And i also new to this forum.
i want to connect few pc sql server together so my system can run at few pc and share same database.
i have tried to do new sql server registration but it fail to connect other pc sql server. i use window authentication and then the other pc i try to connect together also use windows authentication.
chung
|
|
|
|
|
I hope I undrstand what you are trying to do, you have several PC's that you want to connect to an SQL server.
You want to connect to them at an application layer not through code in a project.
Is that correct???
If you just want to connect to an SQL server at the application layer...
Create a DSN entry on "Data Source ODBC" and use the "sa" user to test connectivity.
Create a System DSN follow the wizard and then press "Test Connection" see if this works.
Check it is not XP SP2 or a firewall configuration that is stopping you, check the web there are several sites that can walk you through this.
http://support.microsoft.com/kb/841251/[^]
See how you go.
When people make you see red, be thankful your not colour blind.
|
|
|
|
|
Hi,
The records of the DataSet were loaded from Web Service. I wanna save the records to MS SQL Server table. How can I do? I get a idea: Save the data to xml documents by WriteXml() method, and load the data from xml into SQL Server table. If I do like this , how can I load the xml's records into table? Thanks!
|
|
|
|
|
Are you looking for this
using System.Data.SqlClient;
public DataTable ReturnDataTbl(string XmlFile)
{
DataSet dset = new DataSet();
FileStream fstr = new FileStream(XmlFile, FileMode.Open, FileAccess.Read);
dset.readXml(fstr);
DataTable dtbl = dset.Tables[0];
fstr.Close();
dset.Dispose();
return dtbl;
}
Live Life King Size
Alomgir Miah
|
|
|
|
|
Hi
I have the below sub the reads a single row table and populates the results in a data grid. Some of the fields have numerical values to represent settings.
E.G.
SecurityLevel
1
1 may be admin, so how to I replace the 1 with admin before I populate my datagrid?
Dim Command1 As SqlCommand = New SqlCommand("SELECT [Name], Type, SecurityLevel, Version, CreatedDateTime, Driver, CabinetType, NetworkAddress, LoginFlag, DomainName, AuthenticationType, WebServerAddress FROM dbtab")
Command1.CommandType = CommandType.Text
Command1.Connection = SQLConnection1
myDataSet = New DataSet("myDataSet")
SQLAdapter1.SelectCommand = Command1
SQLAdapter1.Fill(myDataSet, "Document")
DataGrid2.SetDataBinding(myDataSet, "Document")
About 4 of the Columns in the above select statment have values that I would like to replace bases on a lookup list.
OK BIG point I CAN NOT make an intermediate table
Any thoughts
When people make you see red, be thankful your not colour blind.
|
|
|
|
|
Replace SecurityLevel in your Sql statement with a case statement structured as needed.
CASE
WHEN SecurityLevel = 1 THEN 'Administrator'
WHEN SecurityLevel = 2 THEN 'Supervisior'
ELSE 'User'
END As SecurityLevel,
|
|
|
|
|
http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet.webcontrols/browse_thread/thread/e3de64786d1684a2/be32e7aefcb96da6?lnk=st&q=DataGrid+display+custom+value&rnum=1&hl=en#be32e7aefcb96da6
Live Life King Size
Alomgir Miah
|
|
|
|
|
hi buddies
Can anyone help me to get connected with the Oracle 8i through c#. i am using asp.net1.1 and
1. not able to see the "OracleClient" namespace after the "system.Data ".How can i get it.
2. if I want to get connected through Oledb. how can i do that.
Thanks in advance.Please someone help me fast. its urgent.
bye
nauty
|
|
|
|
|
nauty wrote: 1. not able to see the "OracleClient" namespace after the "system.Data ".How can i get it.
You need to add a refernece to System.Data.OracleClient to your assembly. (Right click on the project in the solution folder. Select Add Reference... and look in the .NET tab for it)
nauty wrote: 2. if I want to get connected through Oledb. how can i do that.
Use the classes in the System.Data.OleDb namespace.
ColinMackay.net
Scottish Developers are looking for speakers for user group sessions over the next few months. Do you want to know more?
|
|
|
|
|
So, "osql -L" dumps a list of SQL in the same subnet. What if I want to hide this instance? Is moving it out of the subnet my only option?
|
|
|
|
|
Hi,
Is it possible to combine the two statements below into one?
I want the company name and suppleir's name to list together alphabetically, and not list at the bottom of the supplier's list of names.
"SELECT SupplierID, LastName + ', ' + FirstName AS NameOrCompany, IsLocal FROM Suppliers WHERE IsLocal=false ORDER BY LastName"
"SELECT SupplierID, Company AS NameOrCompany, IsLocal FROM Suppliers WHERE IsLocal=true ORDER BY Company"
Thanks,
Ron
-- modified at 19:01 Monday 20th February, 2006
|
|
|
|
|
How about using a UNION statement for the two queries, then wrap them with an outer SELECT that performs the ordering?
SELECT SupplierID, NameOrCompany, IsLocal
FROM
(
SELECT SupplierID
, LastName + ', ' + FirstName AS NameOrCompany
, IsLocal
FROM Suppliers
WHERE IsLocal=false
UNION ALL
SELECT SupplierID
, Company AS NameOrCompany
, IsLocal
FROM Suppliers
WHERE IsLocal=true
) x
ORDER BY NameOrCompany
|
|
|
|
|
|
What am I doing wrong?
select username AS UserID, domainname AS Domain, dt AS Date from testtable
gives me:
UserID, Domain, Date
kt001, c_domain, 2/20/2006
kt001, p_domain, 2/15/2006
kt001, p_domain, 2/19/2006
which is normal.
SELECT username AS UserID, MAX(domainname) AS Domain, MAX(dt) AS Date
FROM testtable
GROUP BY username
gives me:
UserID, Domain, Date
kt001, p_domain, 2/20/2006
which i would want the domain of whatever the MAX date was... any clues?
|
|
|
|