|
As he modified the OP, my answer stands; no need to demote it...
|
|
|
|
|
OK. You get away with it.............this time.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
you're too kind. almost one of a.
|
|
|
|
|
Luc Pattyn wrote: as you can hardly see the spaces at all
I had a PHB asked me once if I could make the spaces blink. That way they could be seen.
Chris Meech
I am Canadian. [heard in a local bar]
In theory there is no difference between theory and practice. In practice there is. [Yogi Berra]
|
|
|
|
|
Chris Meech wrote: make the spaces blink.
That makes perfect sense: show all special characters the way MS Word does ("show/hide P"), however don't do it permanently, give the user the option to blink them.
|
|
|
|
|
VARCHARs don't make good primary keys anyway.
|
|
|
|
|
hi
SELECT *
FROM Employees
WHERE (FirstName LIKE N'%ф3rcwvcwvcehveivewiuvgetiugheiheiogheighetighiogheioghioegheiowghioghi
oetjehbvjwebvjefbvjefbvjhebvfjkwbejkfbvjhebvjewbvbevjkewkjvjevfw
jhevfjhebvjefbvejwkfbvewjvbejwbvjefbvjewbvfjkebvjkefvbjefvbjefbvefw
ewvhbewjvbejvbejvfbejfvbjehfvbjewfbvjwefvbewjfvbejhvfbjkevbjhefbvefb
ewkljhvewfvekfjvekfvewkljfbvkejfvbkefbvkewfv%')
In the above query, I have more than 128 characters to search in like predicate, what should be in this case ?
and the error message is
The identifier that starts with is too long. Maximum length is 128.
|
|
|
|
|
Strange: I tried your query with SQL Server 2000 and that did not produce an error message.
By the way, Employees.FirstName is a nvarchar(10), hence the long search term is not very useful here anyway.
What do you actually want to do? Do you want to get a list of employees whose FirstName contains either 'abc' or 'def'? That would be WHERE FirstName Like N'%abc%' OR FirstName Like N'%def%' and so on.
|
|
|
|
|
FormView1.FindControl("TextBox2") as TextBox;
I need like it to select the value for DrowpDownList inside GridView
|
|
|
|
|
(GridView1.Rows[Index].findControl("DropDownList1") as DropDownList).SelecteedValue
|
|
|
|
|
I tried your code . but there is some error :
Compiler Error Message: CS0122: 'System.Data.Index' is inaccessible due to its protection level
|
|
|
|
|
Try this code in selectedIndexChanged event of dropdownlist
DropDownList ddl = (sender as DropDownList);
string val = ddl.SelectedValue;
|
|
|
|
|
try this
foreach(GridViewRow gr in Gridview1.Rows)
{
string str = ((DropDownList)gr.FindControl("DropDowmList1")).SelectedValue;
}
|
|
|
|
|
please see the following url
http://tareemnet.com/drop.JPG
User Name : adnet
Pass : 123
When Editting, the user can change the value using the dropdownlist, and then updating with that new value selected.
I'm beginner, please provide me a full code in c# for that issue.
|
|
|
|
|
I could execute the following sql in SMSS, but when adding it in a sqldatasource as an update statement, it gets an error.
In SSMS, and it works fine:
UPDATE S
SET S.DailyBudget = 12
FROM Account O INNER JOIN AdCampaign S
ON O.ID = S.AccountID
WHERE O.EmailAddress = 'abc@abc.com'
But In Sqdatasource, it gets error:
UPDATE S SET S.DailyBudget = 12 FROM Account O INNER JOIN AdCampaign S ON O.ID = S.AccountID WHERE (O.EmailAddress = @EmailAddress)
Error: Invalid Object Name 'S'.
Hint: S,O are borrowed names, and not actual table names.
|
|
|
|
|
Hi,
the hint-text gives you the information why the update failed. SqlDataSource does not provide support for abbreviations. So you have to rewrite your query to
UPDATE AdCampaign SET AdCampaign.DailyBudget = 12 FROM Account INNER JOIN AdCampaign ON Account.ID = AdCampaign.AccountID WHERE (Account.EmailAddress = @EmailAddress)
This should work.
Regards,
Sebastian
|
|
|
|
|
sallam 2 all this is a search query bt i got an exception at column S_No
i.e
Select ROW_NUMBER() OVER(ORDER BY pcpd.Cpt_Code, pcpd.Cpt_Description ASC) AS 'S_No', Provider_Cpt_Plan_Detail_Id, Provider_Cpt_Plan_Id, pcpd.Cpt_Code, isnull(pc.Proc_Description,'') as cpt_description, pcpd.Cpt_Modifier, Non_Facility_Participating_Fee, Non_Facility_Non_Participating_Fee, Facility_Participating_Fee, Facility_Non_Participating_Fee, pcpd.Deleted, pcpd.Created_By, pcpd.Created_Date, pcpd.Modified_By, pcpd.Modified_Date From Provider_Cpt_Plan_Details pcpd left outer join procedures pc on pcpd.Cpt_Code=pc.proc_code Where ORDER BY( pcpd.Cpt_Code, pcpd.Cpt_Description ASC) LIKE '4%' And pcpd.Cpt_Code LIKE '00%' And pcpd.Provider_Cpt_Plan_Id ='100ALLALLALLALLALL' And pcpd.Deleted ='0'
the prob is that i use
Select ROW_NUMBER() OVER(ORDER BY pcpd.Cpt_Code, pcpd.Cpt_Description ASC) AS 'S_No' in select statement im confused what i give in search where clause if i give S_No it gives me error if i give the whole ROW_NUMBER...etc etc it says it is used only in select statement
now it gives me exception Incorrect syntax near the keyword 'ORDER'.
when i used ORDER BY( pcpd.Cpt_Code, pcpd.Cpt_Description ASC) LIKE '4%'
any suggestions what i should do?
|
|
|
|
|
hi
i get the following error when try to install an instance of the SQL Server 2008 failover cluster:
Rule "Cluster shared disk available check" failed.
The cluster on this computer does not have a shared disk available. To continue, at least one shared disk must be available.
the machine in which it's installed is a VM provided by ESXi.
what's the problem and what can i do?
thx
|
|
|
|
|
For a cluster, you'll need at least 2 VM's. (preferably on two different boxes, putting them both on one box is nice for playing around, but it brings you nothing than more points of failure in a production environment).
Next you will need to configure a shared disk, accessible by both machines. This is usually based on some hardware contraption, such as a NAS, or a firewire setup. You may also be able to SIMULATE this in VMWare ESXi, consult the product's documentation.
|
|
|
|
|
I have select query like this :
SELECT AdCampaign.CampaignName, AdCampaign.AdType AS [Campaign Type], AdCampaign.Date AS [Start Date], AdCampaign.Clicks, AdCampaign.Impr, AdCampaign.DailyBudget AS [Daily budget] , AdCampaign.Status FROM Account INNER JOIN AdCampaign ON Account.ID = AdCampaign.AccountID WHERE (Account.EmailAddress = @EmailAddress)
I need like the previous query for update.
How I can do it with Join.
|
|
|
|
|
hi..
How I can Pass session parameters to sqlDataSource. I do like this but it is not work:
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:AdNetConnectionString %>"
SelectCommand="SELECT CampaignName, AdType AS [Campaign Type], Status, Date AS [Start Date], Clicks, Impr, DailyBudget AS [Daily budget] FROM Account INNER JOIN AdCampaign ON Account.ID = AdCampaign.AccountID WHERE Account.EmailAddress = @EmailAddress ">
<SelectParameters>
<asp:SessionParameter Name="EmailAddress" Type="String" SessionField="EmailAddress" />
</SelectParameters>
</asp:SqlDataSource>
The session name is :session["EmailAddress"]
Please guide me.
|
|
|
|
|
Add the risk of sounding repetitious and single-minded: And what is the error message? There are no psychics here.
|
|
|
|
|
I have this query. but it is not work with the session
Please help me.
SELECT AdCampaign.CampaignName, AdCampaign.AdType AS [Campaign Type], AdCampaign.Status, AdCampaign.Date AS [Start Date], AdCampaign.Clicks, AdCampaign.Impr, AdCampaign.DailyBudget AS [Daily budget] FROM Account INNER JOIN AdCampaign ON Account.ID = AdCampaign.AccountID WHERE (Account.EmailAddress = 'Session["Email_Address"]') AND (Account.Pass = 'Session["Password"]')
|
|
|
|
|
And what is the error message?
|
|
|
|
|
We have a group of users who can access various locations within the datacenter.
For the largest group of users, if they can access one location they can access all of the locations.
For a very small population, the user can only access the office and not the data center locations. These users are causing me a problem.
The query is aimed at basically giving me the count of active locations. But in the mixed case I get BOTH a record with a null count AND a record with access count. In otherwords: Amy can access only the office and cannot access dc1 or dc2. The query returns Amy's record as Amy, null and Amy, 1. I want it to return ONLY Amy, 1.
Any suggestions on the changes I need to accomplish that?
Here is the current query:
SELECT dbo.ContactMaster.BmcCustKey,
(SELECT COUNT(dbo.LocationAccessGrant.CanAccessLocation)
WHERE (dbo.LocationAccessGrant.CanAccessLocation = 1)) AS AccessCount
FROM dbo.ContactMaster LEFT OUTER JOIN
dbo.LocationAccessGrant ON dbo.ContactMaster.CompanyID = dbo.LocationAccessGrant.CompanyID AND
dbo.ContactMaster.ContactIdentity = dbo.LocationAccessGrant.ContactIdentity
GROUP BY dbo.ContactMaster.BmcCustKey, dbo.LocationAccessGrant.CanAccessLocation
ORDER BY dbo.ContactMaster.BmcCustKey
|
|
|
|