|
I have read your Article Edit Almost Anything in a datagrid -Declan Brennan.
which is very interesting and a challenging work. My good wishes for your work.
I like to have in depth knowledge on it. Can you please help me?
I like do it in my project Address book for an Hospital in my hometown.
Traversing by Department Name and viewing patient Address in an datagrid.
Loading all patient Pictures and differentiating their disease using color box.
How to place the picure and colorbox ?
Profile
Name :Uma V
Qualification : M.c.a
Currently doing a DOT Net course and implementing a project in c#
Please give me your hand in making my project a success.
Regards
|
|
|
|
|
Hi,
In the database I have a table named
Equipment_Master(EqptNo, Eqptname, EqptDesc,ParentEqpt). In this table the parenteqpt is the any EqptNo from the same table. I want to show this data in the Treeview control(as a Parent Child relation) in Asp.Net. How can I do this.
Regards
Kalayn
|
|
|
|
|
Hi to Everybody!
I’ve got such problem. I have DataTable and I need to save it in dbf file. I need create .dbf file and then save DtataTable’s contents there.
|
|
|
|
|
|
Thank you, Marek, everything is OK now
|
|
|
|
|
Hi all
I just want to know whether new tables can be created in a SQL Server database at runtime.
I tried the following in Transact-SQL:
CREATE PROCEDURE sp_CreateTable
@TableName VARCHAR(20)
AS
CREATE TABLE @Tablename
(
TableIndex INT NOT NULL
)
It seems it is not happy with using a variable as table name
Any ideas?
Thanks.
Kobus
|
|
|
|
|
kbalias wrote:
I just want to know whether new tables can be created in a SQL Server database at runtime.
Yes.
kbalias wrote:
It seems it is not happy with using a variable as table name
You cannot create a table in this way. The table name cannot be substituted with a variable name.
kbalias wrote:
Any ideas?
Build some dynamic SQL and use EXEC(@SqlStatementString)
However, you must be careful with this as the @TableName variable would have to injected into the SQL statement and that could be a source of a SQL Injection attack.
My: Blog | Photos
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More
|
|
|
|
|
how to search for a specific record in a database using a Button on vb.net?
|
|
|
|
|
What are you trying to do here?
PsYcHo_A wrote:
search for a specific record in a database using a Button
<italic>Work hard, Work effectively.
|
|
|
|
|
Well... you first have to create a project, add a form, add a button to that form, and then write some code. At the same time you need to create a database, some tables, columns, and add some rows to them.
Now seriously, what is it that you are having trouble with? your question is very very broad. Is it with connecting to the database? the query to find certain recrds? reading the records? displaying them? We are here to help, but we need more details.
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
I am a littlebit puzzeld. In all de examples i see to display records from a database there is use of datagrid. But datagrid places all the content of a database in a table.
But i would like to do it de old fasioned way en get every item from a single record to be placed somwhere on a page. So after getting a record this way:
Dim getCmd As String = "select * from Peuters where pnummer=Pnummer"
Dim ksDataAdapter As SqlDataAdapter = New SqlDataAdapter(getCmd, KSConn)
Dim dsPeuters As DataSet = New DataSet()
ksDataAdapter.Fill(dsPeuters, "Peuters")
how do i proceed from there. I cant find anything sim on the web ore the asp.net bible or my Englisch is not that good.
|
|
|
|
|
gharryh wrote:
But datagrid places all the content of a database in a table.
The datagrid uses a DataSet, that is filled with the result set of some SELECT command(s) - not the database.
gharryh wrote:
But i would like to do it de old fasioned way en get every item from a single record to be placed somwhere on a page
I don't quite understand your request, but if you mean getting one row at a time from the database, then you can use a SqlDataReader (assuming your DB is SQL Server)
My: Blog | Photos
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More
|
|
|
|
|
Thanks but ow do i access the valuas from dataset and place then into a HTML table for example RoepnaamdatabaseTableRoepnaamI cant find any info on how the syntax schould be.
|
|
|
|
|
If you want to use a dataset - and if you are going to access the information on a row by row basis then that is quite inefficient, I suggest you use a DataReader - then you can use something like this:
object value = MyDataset.Tables[0].Rows[rowIndex][columnNameString] replacing the rowIndex and columnNameString with appropriate values.You can also loop over the rows like this
foreach(DataRow row in MyDataset.Tables[0].Rows)
{
object value = row[columnNameString];
}
Once you have the value from the column you can do what ever you need to do with it. Like, for example, insert it in to the HTML you are building.
Does this help?
My: Blog | Photos
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More
|
|
|
|
|
I wanted to display a single record on a page where the information is placed on sevreral places on that page. The last question is how the code looks like displaying a certain value from a record from a table.
I know how to do that in PHP but it wont work in .NET
|
|
|
|
|
|
well i'm using for frontend vb.net and for backend sql server 2000. there is table name "employee". in the employee table "empId" and "Password" columns are two things.empID is categorized in to type that "Operational Dept and customer Dept" using frontend i've created a system called "login in to main page" when a employee log into system, the empId sould verify his password also. if the empID and password correctly verified then the employee can login to system, here a operational Dept emp has full permission, but others would some permissions. here y question is how solve this problem. pls kidly help me. thank you very much for your kindly help. pls email me the answer...sadikshaf@yahoo.com
Mohamed Sadik
|
|
|
|
|
If id doesn't has full permission
{
Hide/disable some menu.
}
Can this help you? I hope I don't get you wrong.
<italic>Work hard, Work effectively.
|
|
|
|
|
Hi there,
How do I ensure case sensativity in SQL server? If I do a string comparison on "password" and on "Password" then they are exactly the same. This should not be the case. It should only be true if "password" = "password".
Please could someone help.
Thanks
|
|
|
|
|
|
Where do I change this? In Enterprise Manager?
|
|
|
|
|
Generally I set up the collation sequence when I install the server so all string columns use the sequence I want by default, however you can set it at the column level if you wish. I'm not sure if this can be done in the enterprise manager, I tend to script data model changes so I can run them as necessary. Something like this:
ALTER TABLE MyTableName ALTER COLUMN MyColumnName COLLATE Latin1_General_CS_AS
My: Blog | Photos
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More
|
|
|
|
|
You can make a case sensitive test on any SQL configuration by casting the strings to varbinary . Paste this into Query Analyzer:
DECLARE @Test1 VARCHAR(20)
DECLARE @Test2 VARCHAR(20)
DECLARE @Test3 VARCHAR(20)
SET @Test1 = 'Hello World'
SET @Test2 = 'Hello World'
SET @Test3 = 'hello World'
--Normal SQL Compare
PRINT
CASE
WHEN @Test1 = @Test3 THEN
'SQL Compare: Test1 equals Test3'
ELSE
'SQL Compare: Test1 does not equal Test32'
END
--varbinary compare equal strings
PRINT
CASE
WHEN CAST(@Test1 AS VARBINARY(50)) =
CAST(@Test2 AS VARBINARY(50)) THEN
'VarBinary: Test1 equals Test2'
ELSE
'VarBinary: Test1 does not equal Test2'
END
--varbinary compare on case changed strings
PRINT
CASE
WHEN CAST(@Test1 AS VARBINARY(50)) =
CAST(@Test3 AS VARBINARY(50)) THEN
'VarBinary: Test1 equals Test3'
ELSE
'VarBinary: Test1 does not equal Test3'
END
|
|
|
|
|
Or you can just add a COLLATE statement to your comparison:
DECLARE @Test1 VARCHAR(20), @Test2 VARCHAR(20)
SELECT
@Test1 = 'Hello World',
@Test2 = 'Hello world'
--Normal SQL Compare
PRINT CASE
WHEN @Test1 = @Test2 THEN 'Test1 equals Test2'
ELSE 'Test1 does not equal Test2'
END
-- Case sesitive compare
PRINT CASE
WHEN @Test1 = @Test2 COLLATE Latin1_General_CS_AI THEN 'Test1 equals Test2'
ELSE 'Test1 does not equal Test2'
END
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
|
|
|
|
|
That is easier then the binary compare - good info. It does assume you know the language of the server. Not that a password test is a time consuming query, I wonder which is quicker; a conversion plus binary test or a language specific character test? I would assume the first since the other requires multiple comparisons per character. My wife tells me I am wrong most of the time so I would not trust my guess.
|
|
|
|