|
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.
|
|
|
|
|
Looked at many ORM solutions.There are many open source projects.
I have implemented the ;
mapper pattern ______one class one mapper,
identity map_________manage the records that are read from the DB,
Seperated interface_________for having a simplier domain logic,
Registry_________________to centralize the mappers,
Finders__________________for finding objects,
DataSource________________for loading domain objects,
Type converter____________no casting (generics in c# 2.0),
List Loader_________________for loading list of domain objects,
Topological Sorting__________for not writing referantial integrity rules behind UI,
UnitofWork________________for storing the states of our objects for transactions(used system.transactions),
Connection Manager_________dot.net framework 2.0 feature DBProviderFactory is used to change the database providers,
Application Session Manager______for managing the sessions,
and I got all these from martin fowler POEAA,it took no more than a week to accpmplish these.Looked at hibernate and
Npersist they helped a lot.
Am I missing anything?Why anyone needs a commercial OR mapper with is not flexible?
|
|
|
|
|
Simple question, what is the easiest way to reinstall SQLServer2000
|
|
|
|
|
Hi gharry:
What exactly you want to do? Perhaps if running a old Service Pack, did you try with a newer Service Pack.
That should cause to remedy any of your problems with the current SQLServer instance you are facing.
Deepak
Deepak Kumar Vasudevan
Personal Web: http://vdeepakkumar.netfirms.com/
I Blog At: http://deepak.blogdrive.com/
|
|
|
|
|
The simplest way to reinstall something is to remove it and install it again
I hope you understand...
By the way... visit http://nehe.gamedev.net[^]
|
|
|
|
|
Yo i know that, i am not stupid. But i want to be sure that there are no databases lost when i remove the application.
|
|
|
|
|
The data files won't be lost if you uninstall SQL Server. However, you should have a backup of these already just in case.
When you reinstall SQL Server you will just have to attach these data files to the new instance of SQL Server. However, your logins will be lost as they operated at the server level, not the database level - so users will be orphaned from their login.
My: Blog | Photos
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More
|
|
|
|
|
|
Then you should backup you databases and then proceed as I suggested , or simply stop the server and copy the mdf and ldf files corresponding to you databases you want to backup into a safe location...
I hope you understand...
By the way... visit http://nehe.gamedev.net[^]
|
|
|
|
|
Thanks for the info. Stil dont understand your remark "I hope you understand..." Is it friendly or something else??
|
|
|
|
|
Most certanly friendly, actualy is my signature...all my posted messages have this remark, hope this doesn't upsets you.
I hope you understand...
By the way... visit http://nehe.gamedev.net[^]
|
|
|
|
|
Is there a simple way to duplicate / copy an en entire table?
I am using VC++ / ADO ( Access database) and I need to duplicate tables during the program run. It is my understanding that ALTER will rename but not build a new table.
Thanks for your time and help
Vaclav
|
|
|
|
|
Hello !
I have created two tables in access. The 1st table is "products" and the 2nd is "components". I have also established a relation of one to many using the editor in access. Now, from ASP.NET I wish to read a product, television, and its component, screen. Is it enough to call:
StrCommand = "SELECT TVscreenID FROM products WHERE ID = " + x + " ORDER BY ID"
OleDbDataAdapter da = new OleDbDataAdapter(StrCommand, conn);
da.Fill(ds,"products");
for accessing the details of the component 'screen' which is elaborated within the table components ? how do I access the details of the screen through the member 'TVscreenID' ? GetChild() or something? should I change the sql-string command to relate the both tables ?
|
|
|
|