|
Wrong thread...
Mubashir
Software Architect
Storan Technologies Inc, USA
Every job is a self portrait of the person who did it.
|
|
|
|
|
Not necessarily, this is dealing with ADO/ADO.NET.
CleaKO
"I think you'll be okay here, they have a thin candy shell. 'Surprised you didn't know that.'" - Tommy (Tommy Boy) "Fill it up again! Fill it up again! Once it hits your lips, it's so good!" - Frank the Tank (Old School)
|
|
|
|
|
This is more inclined towards the datagrid functionality and how to display data in it.......and i think thats why the other forums are there for....anyhow its your thought
Mubashir
Software Architect
Storan Technologies Inc, USA
Every job is a self portrait of the person who did it.
|
|
|
|
|
In this case I would say that it is close enough not to be a big deal.
CleaKO
"I think you'll be okay here, they have a thin candy shell. 'Surprised you didn't know that.'" - Tommy (Tommy Boy) "Fill it up again! Fill it up again! Once it hits your lips, it's so good!" - Frank the Tank (Old School)
|
|
|
|
|
This is fairly straight forward. You just need to go to the HTML portion of the designer. I would suggest using a template column then use '<%# Container.Item("FirstName") & ' ' & Container.Item("LastName") %>' to set two values to one column.
CleaKO
"I think you'll be okay here, they have a thin candy shell. 'Surprised you didn't know that.'" - Tommy (Tommy Boy) "Fill it up again! Fill it up again! Once it hits your lips, it's so good!" - Frank the Tank (Old School)
|
|
|
|
|
Hi
Stored Procedurs r used to perform single task using mutiple tables.
I know only definition ,Can anyone plz tell me how to create dtored procedue with proper syntax with any example.
Thanks
Care Career
|
|
|
|
|
|
Most simply put, a stored procedure is any sequence of program code that executes against a database, and is stored in that database. A single SELECT statement is still a valid stored procedure, in many implementations.
I believe the SQL standard says that a stored procedure is introduced with the keywords CREATE PROCEDURE , but that's about it. Different databases have their own extended dialects of SQL to support looping and branching, and some may support stored procedures in other languages entirely.
SQL Server 2000 supports stored procedures in Transact-SQL, and SQL Server 2005 adds .NET-based 'stored procedures' written in C# and VB.NET. Oracle supports PL-SQL, which is their extended SQL syntax taking cues from the Ada programming language.
SQL Server supports sending multi-statement commands in a single batch operation. The entire batch is parsed and an execution plan formed and potentially cached before the whole thing is executed. You don't need a stored procedure for this. You can still use named parameters in a plain-text query batch, rather than calling a stored procedure. However, in SQL Server, an execution plan for a stored procedure will live longer in the cache than one for a so-called ad-hoc query.
Users can be granted access to execute a stored procedure but not to directly modify or query the tables used by that procedure. In a system I've implemented, the user account that the application logs in as can only execute the stored procedures - it cannot manipulate any of the tables or views. This means that even if it were to be hacked or the login compromised, it still can't do anything that the application couldn't do anyway.
|
|
|
|
|
Dear Folks,
I am new to this forum, S Anand, From Chennai INDIA
There was a very nice tool that was available "Sql Transaction Log Shrink Wizard", is there a similar tool for shrinking the database too?
Regards, Anand
|
|
|
|
|
What's wrong with Enterprise Manager? Right-click the database in the tree, select All Tasks, Shrink Database. For SQL Server 2005 Management Studio, right-click the database, select Tasks, Shrink, Database.
On a real production system you would normally dedicate disks (or RAID arrays) to a specific database's data files or transaction log, and therefore set the files to occupy about 95% or so of the space on the drive/array, and turn off automatic growth.
If you don't intend to make transaction log backups, set the database's Recovery Model to Simple. Otherwise, transaction log space is only reused once the log has been backed up - if you're not backing it up, it will continue to grow. The Full recovery model allows you to restore to the point of failure if the database files or disks containing them are unrecoverable, but the transaction logs are still available, and you have a full database backup.
|
|
|
|
|
HI Mike,
I dont find anything worng with Enterpriese Manager, however the logs that is getting truncated using the tool is of greater advanantge. The DBCC Shrink command dosent shrink to a greater size and that is why my request was. Thanks for your response i got it.
Anand
|
|
|
|
|
Often I face problems while connecting Sql Server2005
|
|
|
|
|
No one sql server is enough on your PC. If you installed something like visual studio on your PC it will auto install sql express. Then if you installed sql server 2005 after you would have both on your box. I would remove sql express if you have sql server 2005 installed.
Ben
|
|
|
|
|
What problems are you having? I have been running both for a while now and have run into few problems. They are both treated as separate servers.
_____________________________________________________________________
Our developers never release
code. Rather, it tends to escape, pillaging the countryside all around.
The Enlightenment Project (paraphrased comment)
Visit Me at GISDevCafe
|
|
|
|
|
Hi
I have one table Employee having fields id,Name,Salary (id is primary Key)
I have another table Phone having fields id,phone.(id is forign key)
1)using these two tables I want to get all the details of Employee who does not have phone Nos.
2)& I want details of all employees who have more than 2 phone nos.
Plz send these queries as soon as possible.
Thanks
Care Career
|
|
|
|
|
1)
Select e.* from employee e
left join Phone p on e.id = p.id
where p.id is null
2)
select e.id,p.phone from employee e
join phone p on e.id = p.id
group by e.id, p.phone
having count(*) > 1
You should probably buy a good sql book.
Ben
|
|
|
|
|
Hi,
In my app, I would like to insert data into MS Access. In my databse, have 3 columns-(datetime,datetime,text).Below is my code
strInsert = "INSERT INTO Alarms(Date,Time,description)VALUES ('"+dateTimePicker1.Value.Date+"', '"+dateTimePicker1.Value.Date+"' , 'err orlog')";
:
:
conx.open();
OleDbCommand cmd1 = new OleDbCommand(strInsert, conx);
cmd1.ExecuteNonQuery();
conx.close();
I am getting this error message - "OleDbException was unhandled". I am not idea what was wrong.Can anyone guide me to solve this error.
thanks in advance
cocoonwls
|
|
|
|
|
First you may want to figure out which line is cauing the error. If it is the conx.open() line then you have a problem with the connection. If it is the ExecuteNonQuery line then it is probably teh SQL. Is there more to teh error message? I've never inserted a datetime object before, but you may want to lookup the format it needs to be in and whether or not you need the single quotes around it.
Hope this helps.
--------------------------------------------------
Play Nation States and join The Code Project region with the password: byalmightybob
|
|
|
|
|
Hi,
Thanks for your reply.I have found the mistake.The Date value should put "#" symbol infront and after the variable, as below:
strInsert = "INSERT INTO Alarms (DateIn, TimeIn, Description) VALUES (#" +dateTimePicker1.Value+ "#,#" +dateTimePicker1.Value+ "#,'e')"
regards
cocoonwls
|
|
|
|
|
Hi
Select count(*) From TableName
Select count(column) From TableName
Select * From TableName
In these queries which will work more fast ? What could be the reason ?
|
|
|
|
|
DooDooo wrote: In these queries which will work more fast ?
Try them out to find out. Once you've run them, have a think about what each one is actually doing and how many rows they are returning. Hint - try the second count on a nullable column.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
DooDooo wrote: In these queries which will work more fast ? What could be the reason ?
They all do different things. It is an invalid comparison.
|
|
|
|
|
Ya I know all three queries are doing different things. What I mean to say was my friend told that select count(*) will take much time that executing select * from table. Because first it will select all data from table and finds the count. I just wanted to know whether this is rite or not ?
|
|
|
|
|
DooDooo wrote: What I mean to say was my friend told that select count(*) will take much time that executing select * from table. Because first it will select all data from table and finds the count. I just wanted to know whether this is rite or not ?
You also have to take in to consideration network bandwidth used. SELECT COUNT(*) FROM MyTable returns a single value. SELECT * FROM MyTable returns the entire contents of the table.
Also, I'd guess the COUNT(*) would be able to take into account an index so it wouldn't actually have to read every single row, just one of the indexes (which would be a lot less data)
|
|
|
|
|