Referencing Textbox Values
Feb 8, 2007
Is there a way to reference a value from a textbox in a matrix? In other words I want to pull the value in the textbox that is the column header into a cell in the matrix under certain conditions.
View 3 Replies
ADVERTISEMENT
May 24, 2007
I want to add up the values in a couple of text boxes in another textbox. How do I refer to the textboxes?
fields!textbox1.value doesn't work..what does?
View 1 Replies
View Related
Sep 1, 2005
Does anybody knows how to reference a value inside a group in a Matrix.
I know it should be possible to use a calculated field, but I can't find a way to calculate a simple percentage!
example: (The Orders Group have "Received" and "Accepted" columns and these are created Dynamically, and I want to add a calculated field (ie. "%Accepted") to the group.
Simple Formula
%Accepted = "Accepted" / "Received"
i.e.
%Accepted = 5/10 :. (50%)
Matrix Object ( creates columns dinamically)
---------------------------------
Orders "Group"
---------------------------------
Received Accepted %Accepted
10 5 ?
Any Help or Ideas are very much appreciated.
Thanks
View 1 Replies
View Related
Jun 15, 2006
For example, the table below, has a foreign key (ManagerId) that points to EmployeeId (primary key) of the same table.
-------Employees table--------
EmployeeID . . . . . . . . . . int
Name . . . . . . . . . . . nvarchar(50)
ManagerID . . . . . . . . . . . int
If someone gave you an ID of a manager, and asked you to get him all employee names who directly or indirectly report to this manager.
How can that be achieved?
View 6 Replies
View Related
Apr 15, 2007
Is there a way in rs to have a textbox more than the first value when it is dragged on the rs form when creating a report? currently when I drag a text box on the rs form, it only shows the first record on a page/form. There are twenty records on the table where the first value came from. How can I make so that twenty text boxes representing twenty records appear on twenty different pages. In other words, I am trying to build a report with a non - tabular structure that can repeat on different pages.
View 4 Replies
View Related
Aug 6, 2007
Hi,
1. I have one combobox for supplierID, it displays 1,2,3...
Now i want to display the corresponing SupplierDescription in the textbox placed in the Page Header Section. If it is multiple selection then it has to be seperated by ',' (Comma).
Ex: IF i select 1,2,3 in the combobox then in the TextBox should look like
Suplliers: Ram, Don, Krish
Can you please help me in this
Thanks
Dinesh
View 5 Replies
View Related
Oct 6, 2007
the error message I get is
{"Object reference not set to an instance of an object."}
and it points to < Tickr As String = CType(FindControl("TickerTextbx"), TextBox).Text >
this is my code":
Protected Sub TickMastBtn_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles TickMastBtn.Click
REM Collect variablesDim Tickr As String = CType(FindControl("TickerTextbx"), TextBox).Text
Dim Comp As String = CType(FindControl("CoTextbx"), TextBox).TextDim Exch As String = CType(FindControl("ExchTextbx"), TextBox).Text
REM Create connection and command objectsDim cn As New SqlConnection("Data Source=.SQLEXPRESS;AttachDbFilename=C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDataVTRADE.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True")Dim cmd As New SqlCommand
cmd.Connection = cn
REM Build our parameterized insert statementDim sql As New StringBuilder
sql.Append("INSERT INTO TickerMaster ")sql.Append("(Ticker,Company,Exchange,) ")sql.Append("VALUES (@Tickr,@Comp,@Exch,)")
cmd.CommandText = sql.ToString
REM Add parameter values to command
REM Parameters used to protect DB from SQL injection attacksWith cmd.Parameters
.Add("Tickr", SqlDbType.Int).Value = Tickr.Add("Comp", SqlDbType.VarChar).Value = Comp
.Add("Exch", SqlDbType.VarChar).Value = Exch
End With
REM Now execute the statement
cn.Open()
cmd.ExecuteNonQuery()
cn.Close()
End Sub
View 3 Replies
View Related
Mar 17, 2008
I want to have a FromDateTextBox and a ToDateTextBox where the user can enter in dates (most likely in mm/dd/yy format, although intelligently handing other formats might be a plus). Then I want to use these dates as the basis for a WHERE clause like:<some sql...> WHERE start_date BETWEEN 'FromDateTextBox.Text' AND 'ToDateTextBox.Text' (Note this WHERE clause will be used as the basis for an SqlDataSource FilterExpression). 1. I believe the date strings need to be in the format 'yyyy-mm-dd' to search SQL server is this correct?2. What's a decent way to convert the strings from the textboxes to the required format?3. How can I avoid an SQL injection attack?
View 4 Replies
View Related
Mar 23, 2006
Hi All,
I developed a report with some values in textboxes. I want the output not to wrap around to the next line but to be truncated if it is more that the size of the textbox. Is there any setting that i can do b/c values are going to the second line when their size is more like printing name and last name will cause last name to go to the second line ?
Thank you in advance.
View 5 Replies
View Related
Oct 25, 2006
Hi, it is few days I posted here my question, but received no answer. Maybe the problem is just my problem, maybe I put my question some strange way. OK, I try to put it again, more simply. I have few textboxes, their values I need to transport to database. I set SqlDataSource, parameters... and used SqlDataSource.Insert() method. I got NULL values in the database's record. So I tried find problem by using Microsoft's sample code from address http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.sqldatasource.insert.aspx. After some changes I tried that code and everything went well, data were put into database. Next step was to separate code beside and structure of page to two separate files followed by new test. Good again, data were delivered to database. Next step: to use MasterPage, very simple, just with one ContentPlaceHolder. After this step the program stoped to deliver data to database and delivers only NULLs to new record. It is exactly the same problem which I have found in my application. The functionless code is here:http://forums.asp.net/thread/1437716.aspx I cannot find any answer this problem on forums worldwide. I cannot believe it is only my problem. I compared html code of two generated pages - with maserPage and without. There are differentions in code in ids' of input fields generated by NET.Framework:Without masterpage:<input name="NazevBox" type="text" id="NazevBox" /><span id="RequiredFieldValidator1" style='color:Red;visibility:hidden;'>Please enter a company name.</span><p><input name="CodeBox" type="text" id="CodeBox" /><span id="RequiredFieldValidator2" style='color:Red;visibility:hidden;'>Please enter a phone number.</span><p><input type="submit" name="Button1" value="Insert New Shipper" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("Button1", "", true, "", "", false, false))" id="Button1" /> With masterpage:<input name="ctl00$Obsah$NazevBox" type="text" id="ctl00_Obsah_NazevBox" /><span id="ctl00_Obsah_RequiredFieldValidator1" style='color:Red;visibility:hidden;'>Please enter a company name.</span><p><input name="ctl00$Obsah$CodeBox" type="text" id="ctl00_Obsah_CodeBox" /><span id="ctl00_Obsah_RequiredFieldValidator2" style='color:Red;visibility:hidden;'>Please enter a phone number.</span><p><input type="submit" name="ctl00$Obsah$Button1" value="Insert New Shipper" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$Obsah$Button1", "", true, "", "", false, false))" id="ctl00_Obsah_Button1" />In second case ids' of input fields have different names, but I hope it is inner business of NET.Framework.There must be something I haven't noticed, maybe NET's bug, maybe my own. Thanks for any suggestion.
View 2 Replies
View Related
Feb 29, 2008
Hi all,please have a look of code i am unable to perform save operation onthe asp.net web page.I ahve written a stored procedure. the same code works if all aretextboxes, but some of textbox replaced with dropdownlist box thenthis save operation doesn't occurs. please let me know where is themistake in coding .vb.net code :- Protected Sub btnSave_Click(ByVal sender As Object, ByVal e AsEventArgs) Dim employmentID As Integer =Request.QueryString("employmentID") Dim resourceID As Integer = Request.QueryString("resourceID") Dim projectID As Integer = Request.QueryString("ProjectID") Dim dbconsave As SqlConnection dbconsave = New SqlConnection(HRISDBConnectionString) Dim dbcomsave As New SqlCommand("sp_save_NewHireEmailnotify",dbconsave) dbcomsave.CommandType = CommandType.StoredProcedure dbcomsave.Parameters.Add(New SqlParameter("employmentID",SqlDbType.Int)) dbcomsave.Parameters("employmentID").Value = employmentID dbcomsave.Parameters.Add(New SqlParameter("resourceID",SqlDbType.Int)) dbcomsave.Parameters("resourceID").Value = resourceID dbcomsave.Parameters.Add(New SqlParameter("ProjectID",SqlDbType.Int)) dbcomsave.Parameters("ProjectID").Value = projectID dbconsave.Open() dbcomsave.Parameters.Add("@PreferredFirstName",SqlDbType.VarChar) dbcomsave.Parameters.Item("@PreferredFirstName").Value =txtPreferredFirstName.Text.ToString() dbcomsave.Parameters.Add("@PreferredLastName",SqlDbType.VarChar) dbcomsave.Parameters.Item("@PreferredLastName").Value =txtPreferredLastName.Text.ToString() dbcomsave.Parameters.Add("@CellPhone", SqlDbType.VarChar) dbcomsave.Parameters.Item("@CellPhone").Value =txtCellPhone.Text.ToString() dbcomsave.Parameters.Add("@HomePhone", SqlDbType.VarChar) dbcomsave.Parameters.Item("@HomePhone").Value =txtHomePhone.Text.ToString() dbcomsave.Parameters.Add("@HomeAddressLine1",SqlDbType.VarChar) dbcomsave.Parameters.Item("@HomeAddressLine1").Value =txtHomeAddressLine1.Text.ToString() dbcomsave.Parameters.Add("@HomeAddressLine2",SqlDbType.VarChar) dbcomsave.Parameters.Item("@HomeAddressLine2").Value =txtHomeAddressLine2.Text.ToString() dbcomsave.Parameters.Add("@HomeAddressState",SqlDbType.VarChar) dbcomsave.Parameters.Item("@HomeAddressState").Value =txtHomeAddressState.Text.ToString() dbcomsave.Parameters.Add("@HomeAddressCity",SqlDbType.VarChar) dbcomsave.Parameters.Item("@HomeAddressCity").Value =txtHomeAddressCity.Text.ToString() dbcomsave.Parameters.Add("@HomeAddressZIP", SqlDbType.VarChar) dbcomsave.Parameters.Item("@HomeAddressZIP").Value =txtHomeAddressZIP.Text.ToString() dbcomsave.Parameters.Add("@HomeAddressCountry",SqlDbType.VarChar) dbcomsave.Parameters.Item("@HomeAddressCountry").Value =txtHomeAddressCountry.Text.ToString() dbcomsave.Parameters.Add("@ArrangementType",SqlDbType.VarChar) dbcomsave.Parameters.Item("@ArrangementType").Value =ddlArrangementType.SelectedItem.ToString() dbcomsave.Parameters.Add("@PracticeGroup", SqlDbType.VarChar) dbcomsave.Parameters.Item("@PracticeGroup").Value =ddlPracticeGroup.SelectedItem.ToString() dbcomsave.Parameters.AddWithValue("@EquipmentNeeds",txtEquipmentNeeds.Text.ToString()) Try dbcomsave.ExecuteNonQuery() lblMessage.Text = "Record saved successfully" Catch ex As Exception End Try dbconsave.Close() End Sub==============================================================================.aspx code :-<table> <tr> <td > <asp:LabelID="lblPreferredFirstName" runat="server" Text="Name(Preferred FirstLast) :" ForeColor="Blue"></asp:Label> </td> <td <asp:TextBoxID="txtPreferredFirstName" runat="server" Text="" BorderStyle="None"></asp:TextBox> <asp:TextBoxID="txtPreferredLastName" runat="server" Text="" BorderStyle="none" ></asp:TextBox> </td> </tr> <tr> <td > <asp:Label ID="lblCellPhone"runat="server" Text="CellPhone :" ForeColor="Blue"></asp:Label> </td> <td > <asp:TextBox ID="txtCellPhone"runat="server" Text="" ></asp:TextBox> </td> </tr> <tr> <td > <asp:Label ID="lblHomePhone"runat="server" Text="HomePhone :" ForeColor="Blue"></asp:Label> </td> <td > <asp:TextBox ID="txtHomePhone"runat="server" Text="" ></asp:TextBox> </td> </tr> <tr> <td > <asp:LabelID="lblHomeAddressLine1" runat="server" Text="HomeAddressLine1 :"ForeColor="Blue"></asp:Label> </td> <td > <asp:TextBoxID="txtHomeAddressLine1" runat="server" Text="" ></asp:TextBox> </td> </tr> <tr> <td > <asp:LabelID="lblHomeAddressLine2" runat="server" Text="HomeAddressLine2 :"ForeColor="Blue"></asp:Label> </td> <td > <asp:TextBoxID="txtHomeAddressLine2" runat="server" Text="" ></asp:TextBox> </td> </tr> <tr> <td > <asp:LabelID="lblHomeAddressState" runat="server" Text="HomeAddressState :"ForeColor="Blue"></asp:Label> </td> <td > <asp:TextBoxID="txtHomeAddressState" runat="server" Text="" ></asp:TextBox> </td> </tr> <tr> <td > <asp:LabelID="lblHomeAddressCity" runat="server" Text="HomeAddressCity :"ForeColor="Blue"></asp:Label> </td> <td > <asp:TextBoxID="txtHomeAddressCity" runat="server" Text="" ></asp:TextBox> </td> </tr> <tr> <td > <asp:LabelID="lblHomeAddressZIP" runat="server" Text="HomeAddressZIP :"ForeColor="Blue"></asp:Label> </td> <td > <asp:TextBoxID="txtHomeAddressZIP" runat="server" Text="" ></asp:TextBox> </td> </tr> <tr> <td > <asp:LabelID="lblHomeAddressCountry" runat="server" Text="HomeAddressCountry :"ForeColor="Blue"></asp:Label> </td> <td > <asp:TextBoxID="txtHomeAddressCountry" runat="server" Text="" ></asp:TextBox> </td> </tr> <tr> <td > <asp:Label ID="lblArrangement"runat="server" Text="Arrangement :" ForeColor="Blue"></asp:Label> </td> <td > <asp:DropDownListID="ddlArrangementType" runat="server" Width="160px"DataSourceID="ObjectDataSourceArrangementType"DataTextField="ArrangementType" DataValueField="ArrangementType"OnDataBound="ddlArrangementType_DataBound"> </asp:DropDownList> <%--<asp:TextBoxID="txtArrangement" runat="server" Text="" ></asp:TextBox>--%> </td> </tr> <tr> <td > <asp:LabelID="lblPracticeGroup" runat="server" Text="Practice Group :"ForeColor="Blue"></asp:Label> </td> <td > <asp:DropDownListID="ddlPracticeGroup" runat="server" Width="160px"DataSourceID="ObjectDataSourcePracticeGroup"DataTextField="PracticeGroup" DataValueField="PracticeGroup"OnDataBound="ddlPracticeGroup_DataBound"> </asp:DropDownList> <%--<asp:TextBoxID="txtPracticeGroup" runat="server" Text="" ></asp:TextBox> --%> </td> </tr></table>please help me to solve the issue.Thanks in advance
View 3 Replies
View Related
Jan 2, 2008
I have a field called "Owners", and it's a child to an "Activities" table.
An Activity can have on or more owners, and what I'd like to do is some how comma separate the values that come back if there are more than one owners.
I've tried a subreport, but because the row is colored and if another field, title, expands to a second row (b/c of the length) and the subreport has just one name, then the sub-report has some different color underneath due to it being smaller in height.
I'm kinda stuck on how to do this.
Thanks!
View 3 Replies
View Related
Jun 4, 2007
Hello,
I'm trying to set textbox values when a report is rendered. Ideally I want to load all the required data for all my textboxes on my report in one dataset and have each of my textboxes query or lookup if you want that dataset to get the value I want.
Seems simple enough but I can't get it to work using Custom Report Code or any other ways. Can somebody give me any pointer regarding how I can achieve this?
Many thanks.
View 1 Replies
View Related
Sep 12, 2007
Hi!
I dont know if i will explain this correctly, but my problem is with reporting service.
I'm supposed to Sum value in one textbox and than that sum use it in sum in other textbox.
Something like this:
Sum(Fields!Abc.Value/(Fields!dfg.Value+Sum(Fields!abc.Value)),"matrix1_RowGroup1")*100
I get error msg 'The Value expression for the textbox 'textbox49' contains an aggregate function (or RunningValue or RowNumber functions) in the argument to another aggregate function (or RunningValue). Aggregate functions cannot be nested inside other aggregate functions.'
Something like this wont work either Sum(Fields!abc.Value/ReportItems("textbox56").Value)*100
Error The Value expression for the textbox 'textbox55' uses an aggregate function on a report item. Aggregate functions can be used only on report items contained in page headers and footers.
So, pls help if you know how to reference textbox in other in body of report.
Thx.
View 1 Replies
View Related
Nov 16, 2006
I have a SqlDataSource - The select statement
selects the DB row with an ID that equals a querystring value.... So I
know I am only selecting one row..Now I want to create a little
Sub that grabs any field(s) of my choice and then I can assign the
value of it to a textbox on my page or a variable if I need to... Any
idea how I actually reference the fields via the SQLDataSource in a
sub? I see you can reference parameters using..SqlDataSource1.SelectParameters()I was hoping I could use something similar to get the actual DB fields like the below...SqlDataSource1.Select("MyDataBaseField").Value = TextBox.TextCan anyone help please??Thanks
View 7 Replies
View Related
Mar 13, 2007
The Background:
From page 1 a search is created and this value is converted to a querystring and given the name "id=" and passed to page 2. Page 2 then does a lookup in the sql 2000 db useing this querystring.
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ListingDBConnectionString %>"
SelectCommand="SELECT [ID], [CompName], [Package] FROM [CDetails] WHERE ([ID] = @ID)">
<SelectParameters>
<asp:QueryStringParameter Name="ID" QueryStringField="id" Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>
The Problem:
What I then need to do is an IF THEN ELSE statement.
IF [Package in SQL1] = 4 Then
Package 4
IF [Package in SQL1] = 3 Then
Package 3
Only how do I reference the sql value in the if statement.
I have tried
<%IF Eval("Package") = 4 Then %> and with Bind - No good
View 4 Replies
View Related
May 4, 2008
Hi all, How do I return pictures along with my search results? For example, I have a shoe database and for the results I would like one column to hold a picture of the shoe (the other columns hold Brand, Name, Price, etc) The way I am looking at implementing this is by referencing the image and retrieving it from the server. I'm a bit lost on how to do this though. Any help? Thanks in advance,Nick
View 4 Replies
View Related
Sep 1, 2007
Hi,
I'm using MS SQL 2005 Express.
CREATE TABLE Folder (
iD int NOT NULL IDENTITY (1, 1) PRIMARY KEY,
folderName varchar(50) NOT NULL,
parentFolderID int NULL
FOREIGN KEY REFERENCES Folder (iD)
)
GO
if I add an ON DELETE CASCADE to the foreign key, then i get an error... which is annoying. If a folder is deleted, then all its sub-folders should also be automatically deleted.
The error is: 'Introducing FOREIGN KEY constraint 'FK__Folder__parentFo__7D78A4E7' on table 'Folder' may cause cycles or multiple cascade paths. Specify ON DELETE NO ACTION or ON UPDATE NO ACTION, or modify other FOREIGN KEY constraints.'
Anyone got any advice?
View 1 Replies
View Related
Jul 20, 2005
I was created a function named aa.It is possible to reference to it without using the dbo. prnounce ?eg: select aa(), not select dbo.aa()thanks,Viktor
View 1 Replies
View Related
Nov 16, 2007
Hello,
I need to sum up a sub-report value, but I don't know the syntax to reference the subreport.
How do I reference a subreports value to sum it up?
Thanks,
View 7 Replies
View Related
Nov 28, 2007
I'm setting up a trigger that will fire off an email explaining that this entry has been updated, however I need a reference to the updated row so I only send that bit of information off.
Heres my code thus far:
ALTER TRIGGER [dbo].[completeCreation2]
ON [Database_Test].[dbo].[Projects]
AFTER UPDATE
AS
-- SEND EMAIL
EXEC msdb.dbo.sp_send_dbmail
@profile_name = 'Administration',
@recipients = 'email@email.com',
@body = 'A new project has been created view details of the project below:',
@subject = 'Project Created',
@body_format = 'TEXT',
@importance = 'High',
@query = 'Select * FROM updated';
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
END
I thought the select From updated would work but it doesn't I need a reference for that line, select * FROM _____.
Thanks
View 3 Replies
View Related
Apr 17, 2008
I am trying to run a mobile device with SQL's mobile 3.5.
When I run my application I am given an error that sqlceme35.dll plus several other references cannot be found
When I try referencing them It does not allow me too.
Is there any steps I should take to make referencing allowed?
View 1 Replies
View Related
Nov 20, 2007
Hi
This is probably a noob question. In reference to my previous post about OLE DB and variables, I need to copy the whole result set to a table. i tried
Code Block
exec('insert into '+@tableName+' ('+@ColumnNames+') '+@curTableResult)
where @tableName is the table name, @ColumnNames are the column names and @curTableResult is the Result set produced by the Execute SQL statement before. Obviously didnt work.
How do I copy the Result set to a table?
Thanks
CoyoteM
View 7 Replies
View Related
Nov 8, 2007
Hi there everyone,
A quick question. How do I reference variables (system and user) in SSIS by name instead of by just using a "?". The reason why I'm asking is because I'm trying to log what happens in a package to SQL, and if I cannot reference a variable by name it tries to insert variable values into incorrect fields?
An example of the code I'm trying to use can be found below:
Code Block
UPDATE dbo.History_Control_Table
SET
End_Date = GetDate()
, Result = 'Success'
, Status = NULL
, No_Of_Records_Processed = ? --This is where I want to tell it which variable to use
, Package_Name = ?
, No_Of_Records_Rejected = ?
--etc etc etc
WHERE
Package_Name = ?
AND Task_Name = 'Deals_Fact_Stg'
AND Status = 'Running'
Thanks in advance.
Chow.
View 11 Replies
View Related
Sep 18, 2006
This book 'MS SQL Server 2000 Bible' says the following:
'The foreign key can reference primary keys, unique constraints, or unique indexes of any table'
I've never heard of this before, I thought that the FK always established referential integrity by referencing the PK in the parent table. Does anyone have a further explanation of this?
thx,
Kat
View 5 Replies
View Related
Feb 7, 2008
Is there a way to reference textboxes in an SSRS table like one would for cells in Excel? For example, something like =textbox1/textbox2? I am trying to replace a spreadsheet by turning it into an automated report and need to do some horizontal formulas and when I put in the grouped total, it always defaults to averaging percetages from the rows above, which isnt a true summary in my case.
View 11 Replies
View Related
May 25, 2005
I have a table that holds a ParentID and the RecordID. There is a column called IsEnabled which is a bit field indicating if a folder can be displayed or not. 0 = NO, 1 = YESThe table is for a directory structure which is virtual and displays folders on a web page.Root----- 1---------- 1-1---------- 1- 2----------------- 1-2-1----------------- 1-2-2----------------------- 1-2-2-1----------------- 1-2-3----------------- 1-2-4---------- 1- 3---------- 1- 4I need a query that will not select any children that are under a Parent that is disabled. So if ' 1- 2 ' is disabled then:---------- 1- 2----------------- 1-2-1----------------- 1-2-2----------------------- 1-2-2-1----------------- 1-2-3----------------- 1-2-4SHOULD NOT SHOW.Can anyone give me a query that will overcome this problem i have.-J
View 4 Replies
View Related
Jul 24, 2002
Anyone know a way to pull specific fields from an excel spreadsheet.
I'm using SQL7 DTS to pull data into a SQL table. I can pull the entire
sheet but I just want certain fields.
thanks, archie
View 2 Replies
View Related
Jul 18, 2000
I would like a stored proc to be fed the table name as a paramater.
I tried below
create procedure testit as
set nocount on
declare @tblnm varchar(50)
select * from @tblnm
but it get Server: Msg 170, Level 15, State 1, Procedure testit, Line 5
Line 5: Incorrect syntax near '@tblnm'.
Any idea
View 1 Replies
View Related
Sep 30, 2006
I'm quite new to using t-sql, so hopefully the answer to this should be fairly simple... I have the following basic stored procedure:
Quote: CREATE PROCEDURE dbo.SP_Check_Login (
@arg_UserEmail VARCHAR(255),
@arg_UserPassword VARCHAR(255))
AS
BEGIN
SELECT a.userArchived,a.userPasswordDate
FROM app_users a
WHERE a.userEmail = @arg_UserEmail
AND a.userPassword = @arg_UserPassword
END;
GO
What I want to do is some conditional statements on the query results.
i.e:
IF (userArchived = 1)
RETURN "Archived"
ELSE IF (userPasswordDate < dateadd(month,-3,getdate())
RETURN "UpdatePassword"
ELSE
RETURN "OK"
So firstly how to I reference the data returned by the query, and secondly am I on the right track with the conditional code?
Thanks, Mike
View 2 Replies
View Related
Oct 17, 2005
Hello,
I have an access database and an SQL database and using data transformation services, i want to update the access database using the SQL data.
Can anyone tell me the syntax for referencing the access database?
Is it something like: [TABLENAME].dbo.FIELDNAME ?
Just to clarify, i have
Microsoft Access Database
Table 1 (UnitHistory)
SQL Database
Table 1 (UnitHistory)
How do i reference these seperately? I want to update the microsoft access database based on the SQL database data.
Eventually i'm trying to update an access database using the data held on my SQL server. Is DTS the best way for me to acomplish this or should i use another method?
Thanks guys
View 1 Replies
View Related
May 8, 2008
Hi there
Let say i have single dataset with different view (tables/list/matrix etc) with filter on it. Is it possible referencing from one view (table/list/matrix) to another? Basically how to access the other field for instance SUM from different view and used for the other view instead.
Thank you
View 1 Replies
View Related
May 16, 2008
I have a UniqueIdentifier as a self referencing foreign key. The pk gets set by default using the newid(). I need the foreign key to default to that same value. how can i do that? @@identity doesnt work, $rowguid doesnt work, column name doesnt work. Any ideas?
View 9 Replies
View Related