How can I connect from vs2005 to remote Sql Server (Sql Server 2008 ) when I connect
I have amessage mean that is not support connecting from VS2005 to Sql Server 2008
I'm looking up access logs for specific courses. I need to show all the courses even if they don't exist in the logs table. Hence the outer join.... but after trying (presumably) all of the variations of LEFT OUTER, RIGHT OUTER, INNER and placement of the tables within the SQL code, I couldn't get my result.
Here's what I am running:
SELECT …
we have SAP Business One - Fourth Shift Edition running here at a small manufacturing company. The consulting company that has come in to do the installation/implementation uses the "sa" id/pass to initially connect to the database to get the list of companies. From then on, I have to assume that its the sa id/pass that is being used to connect…
I created one ASP.Net project using SQLServer database as back end.I shows the foollwing error .How to solve this?
===============Coding
Imports System.Data.SqlClient
Partial Class Default2
Inherits System.Web.UI.Page
Dim myConnection As SqlConnection
Dim myCommand As SqlCommand
Dim ra As Integer
Protected Sub Button1_Click(ByVal sender…
For several years I have been using a testing tool called qmTest that allows me to do test-driven database development for some Firebird databases. I write a test for a new feature (table, trigger, stored procedure, etc.) until it fails, then modify the database until the test passes. If necessary, I do more work on the test until it fails…
Hi,
I am working with SSRS2005. I have requirement to display total in the footer. We have to display the total of each category. What I used to do is, write expression for all category names and hide those totals that are not having any value in the current selection.
Mango Count = sum(iif(fields!Category.Value = “Mango”,0,1))
Apple Count…
Hi:
I am trying to create a Database alias for many of the DBs. I wonder if there is a T-sql that can let me do it. I have not found anything about this.
Thx.
In my database, assume we have a table defined as follows:
CREATE TABLE [Chemical](
[ChemicalId] int NOT NULL IDENTITY(1,1) PRIMARY KEY,
[Name] nvarchar(max) NOT NULL,
[Description] nvarchar(max) NULL
)
The value for Name can be very large, so we must use nvarchar(max). Unfortunately, we want to create an index on this column,…
In my recent SO question I was helped tremendously in using git as a front-end to ClearCase. However actually trying the suggested answer(s) led to further complications. Visual Studio keeps a reference to the used source control provider in both the .sln as well as the .csproj files. I tried resolving this issue by keeping a modified copy…
I am trying to run several DTS packages from a sql 2000 box. The DTS calls will originate from .net 2.0 - 3.5 code. I have been unable to find a good way to programmatically accomplish this. What I have read is running a sql job from a stored procedure that calls the DTS package. Does anyone has any experience with this or know of a good…
How can I insert values from a comma-separated input parameter with a stored procedure?
For example:
exec StoredProcedure Name 17,'127,204,110,198',7,'162,170,163,170'
you can see that I have two comma-separated value lists in the parameter list. Both will have the same number of values: if the first has 5 comma-separated values, then…
I'm having a hard time doing this query.
I want to compare dates in my query, dates from my DB are in this format:
(MM/DD/YYYY HH:MM:SS AM)
I want to compare this date with tomorrow's day, today plus one.
My questions are:
How do I declare tomorrow's date in sql server?
How would you compare these two dates?
Thank you!! =D
EDIT :…
Hi all,
the FORMSOF THESAURUS throws errors for specific character. E.g. FORMSOF (THESAURUS, hel!lo) throws an error where as FORMSOF (THESAURUS, hel?lo) works. But I didn't find any documentation about which characters are allowed.
Can you help me out? Thanks alot
In DB2 there is a support for Materialized Query Table (MQT). Basicly you write a query and create a MQT. But the difference from View is that the query is pre-executed and resulting data is stored in MQT and there are some options when to refresh/syncronize the MQT with base tables.
I want same functionality in SQL Server. Is…
I have a stored procedure that inserts into a table (where there is an identity column that is not the primary key- the PK is inserted initially using the date/time to generate a unique value).
We then use SCOPEIDENTITY() to get the value inserted, then there is some logic to generate the primary key field value based on this…
Can someone please explain this:
SELECT
CASE WHEN CAST('iX' AS nvarchar(20))
> CAST('-X' AS nvarchar(20)) THEN 1 ELSE 0 END,
CASE WHEN CAST('iX' AS varchar(20))
> CAST('-X' AS varchar(20)) THEN 1 ELSE 0 END
Results: 0 1
SELECT
CASE WHEN CAST('i' AS nvarchar(20))
> CAST('-' AS…
Hi,
I have the situation where i have two databases with same structure. The first have some data in its data tables. I need to create a script that will transfer the data from the first database to the second. I have created this script.
DECLARE @table_name nvarchar(MAX),
@query nvarchar(MAX)
DECLARE…
I'm having real difficulty with a query involving 3 tables. I need to get the 3 newest users per department grouped by department names. The groups should be sorted by the users.dateadded so the department with the newest activity is first. The users can exist in multiple departments so Im using a lookup…
An example of my tree table is: ([id] is an identity)
[id], [parent_id], [path]
1, NULL, 1
2, 1, 1-2
3, 1, 1-3
4, 3, 1-3-4
My goal is to query quickly for multiple rows of this table and view the full path of the node from its root, through its superiors, down to itself. The ultimate question is,…
We're getting the error "The user does not have permission to perform this action" during times of heavy load (regularly, when a trim job occurs). The error clears up when the service accessing sql server is restarted, so it's obviously not a real permissions problems.
What kind of situations could…
Hi,
I have one question for you, if you can answer and refer resource it will be great help.
I have a scenario where i need to create a appointment slot and a serial no for each slot memberwise.
ex:
Member Id |App Slot #
1|1
1|2
2|1
2|2
1|3
what im doing is take the Max slot…
Does any one know how I would have to change the following to work with ms sql?
WHERE registrationDate between to_date ('2003/01/01', 'yyyy/mm/dd')
AND to_date ('2003/12/31', 'yyyy/mm/dd');
What I have read implies I would have to construct it using DATEPART() which could become…
Create table testxml
(xmldata xml)
declare @var nvarchar(max)
set @var = N'?????? ?????? ????'
insert into testxml
select @var
After inserting , i am getting data from table like
select * from testxml
---------------------
????????
Can you provide me the solution?
I have been playing around with a quite complex SQL Statement for a few days, and have gotten most of it working correctly.
I am having trouble with one last part, and was wondering if anyone could shed some light on the issue, as I have no idea why it isnt working:
INSERT INTO…
If I pass in an xml parameter to a stored proc which looks like this:
<ClientKeys>
<ck>3052</ck>
<ck>3051</ck>
<ck>3050</ck>
<ck>3049</ck>
...
</ClientKeys>
...and then convert the XML to a temp table…