Encrypt Data When Select From Datasource?
Jan 16, 2011name=abc
SqlDataSource1.SelectCommand = "select name from table1 where ID=1"
SqlDataSource1.DataBind()
how to encrypt field name ?
name=abc
SqlDataSource1.SelectCommand = "select name from table1 where ID=1"
SqlDataSource1.DataBind()
how to encrypt field name ?
Scenario: we have a ERP software developed in ASP.Net and SQL Server 2008 as database.
Requirement: we need to encrypt / decrypt the data in the SQL Server so that only my application can read the data, How can I get this task done.
How can I encrypt all Stored Procedures of a database at once?
View 3 RepliesThe drop down list is used to determine what search criteria will be used to find an invoice. I tried to set the Select method in the switch statement. I don't understand how to set the Select Method and the select parameters programmatically though . I tried a few different ways but can't make the compiler happy. My ODS is in scope in the code behind. I'm not able to access it's properties though. The BAL resides in a separate project that is a ClassLibrary. I also have a using statement for the ClassLibrary project in the code behind.
give me an example of how to do this?
Mark up:
[Code]....
[Code]....
[Code]....
[Code]....
protected void Button19_Click(object sender, EventArgs e)
{
SqlDataSource conn = new SqlDataSource();
conn.ConnectionString = ConfigurationManager.ConnectionStrings["Database2ConnectionString1"].ToString();
conn.SelectCommandType = SqlDataSourceCommandType.Text;
conn.SelectCommand = "SELECT FROM table1 (a, b)VALUES(@a,@b)";
conn.SelectParameters.Add("a",TextBox1.Text);
conn.SelectParameters.Add("b", TextBox2.Text);
int rowsAffected = 0;
try
{
rowsAffected = conn.Selectt();
}
catch (Exception)
{
Label1.Text = "Error";
}
finally {
conn = null;
}
if (rowsAffected != 0)
{
Label1.Text = "Data saved";
}
}
well it returns error no overloading method for select (P.S. same code work fine for insert)
I will declarate a attribute, but it gives me an error
This query works fine and returns 1 record from type int:
SELECT TOP 1 DataObjectVersionID
FROM tblDataObjectVersionPropertyValueText
WHERE PropValue like CAST('00010281' AS ntext)
ORDER BY DataObjectVersionID DESC
And when I will declarate a attribute/parameter it gives me an error:
DECLARE @dataObjectVersionId INT
SET @dataObjectVersionId = SELECT TOP 1 DataObjectVersionID
FROM tblDataObjectVersionPropertyValueText
WHERE PropValue like CAST('00010281' AS ntext)
ORDER BY DataObjectVersionID DESC
Error message:
Msg 156, Level 15, State 1, Line 2
Incorrect syntax near the keyword 'SELECT'.
In the table save your credit card.I want to encrypt all credit card information to be recorded in the database.
View 2 RepliesIn anyway, is it possible to select data from a table, in such a way?
[code]...
I am trying to select data with Linq and bind to a DDL. The custid field allows duplicates in this table, but I only want unique values in the ddl. I tried the following code:
[Code]....
The use of "Select Customer.CustID", with or without the Distinct, causes this runtime error. CustID is a valid field in the table, and it shows up in intellinsense and compiles. If I just Select Customer, the error goes away, but Distinct doesn't know to look for distinct custid's.
DataBinding: 'System.String' does not contain a property with the name 'CustID'.
I am trying to pad for null values in the below code. Anybody know how to fix this error? Conversion from type 'DBNull' to type 'String' is not valid.
Dim dvUserImgPath As Data.DataView = CType(ImgPathDS.Select(DataSourceSelectArguments.Empty), Data.DataView)
Dim drUserImgPath As Data.DataRowView = dvUserImgPath.Item(0)
lblHiddenImgPath.Text = drUserImgPath.Item("ImgPath")
I wish to select my data in sql server where it could be data that were added this month and/or this week.
For example my table - TestTable has the following fields:
AddDate - nchar(10)
RandomData - nvarchar(50)
When the user input the date, the format is in "dd/MM/yyyy". How do I go about doing this?
i have used one query like this
Select skillReq from tblPostJobs where SkillReq like '%Silverlight 2.0%'
it is working fine. But while giving
Select skillReq from tblPostJobs where SkillReq like '%Silverlight 2.0,C#%'
It is not filtering data from database. It is only checking starting and ending Character.In my database some keyskill are like that
Asp.net 3.5,4.0,C#,Sql server 2008,Silverlight 2.0,3.0.
My requirement is to check each word in "SkillReq" text.
I want to create an application where I need to enter date to the ms access database.
I am a bit confused regarding how to make the user to enter date. The options avaliable are:
a. Shall I use a textBox?
b. Shall I go for 3 drop down lists?
or something else.
Some more questions:
1. what date format shall i use? (dd-mm-yyyy, dd-mmm-yyyy, etc, etc or anything else)
2. What datatype shall i use to store the date in the database?
3. What SQL query shall i use to retrieve the data between 2 dates?
let me know if there are multiple options available regarding this application.
I want to make this application as easy as possible for the user.
Mmy data table has four columns. How can I get only selected columns name?
View 5 Replieshow can i select data into temp table from another database in sql server 2000
View 2 RepliesHow do I select a column with the latest "datetime" data type, in Visual Web Developer 2008, ASP.NET 3.5 ?
In the config data source WHERE option my options are greater than cookie, control, etc... but I would like to select where the datetime is the latest in the table.
I want use select * from sample (tablename) ,which returns only those columns from sample table which does not have xml data type.
note : sample table contains some columns which have xml data type .
So far i've populated my grid view with my roomID. however using data reader I don't seem to be able to get more than one column to auto generate even though i'm now looking for three values : SELECT tt_roomEquip.roomID, tt_room.roomCapacity, tt_equip.equipTitle is my select bit of the sql, though it's only putting roomID into my grid view.
View 1 RepliesI get and error when I run a sub select statement. What is wrong with the statement?
[Code]....
[Code]....
ERROR:
System.Data.SqlClient.SqlException: Only one expression can be specified in the select list when the subquery is not introduced with EXISTS.
I have three table like above, table C is mapping table which has foreign key of Table A and B.How can i select and insert data in Table C using Entity Frame Work?
View 2 Replies[code]....
Is ther a way I can tie DataSource to SqlDataSource on aspx page and pass select parameters?
This query does not return any record
[code]....
On my web form, I have a RadioButtonList as follows:
Select a radio button when page loads based on RadioButtonList's DataSource
I have an excel file with data as follows
ID Name Contact No Address
1 ABC XXXXXXX ABCNM2
XYZ xxxxxxx ASDFG
Now my requirement is read data from this excel sheet and den encrypt Contact No field for each row and den save data in database, how should it will be done I have to use some ready made available encryption algo for that.
I have some sensitive data that will be stored in one of my database tables, how would I go about encrypting it while saving it to the database and then decrypting it when retreiving it? I am using VB.NET
View 2 Replies