|
emiralp wrote: what does the @ mean ?
In general it indicates that this represents a parameter name. However, in the example you've given it means nothing as you've enclosed it in apostrophes and has become part of a string literal.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
* Reading: Developer Day 5
Never write for other people. Write for yourself, because you have a passion for it. -- Marc Clifton
My website
|
|
|
|
|
kubben wrote: In your example above it is a parameter that is being used to pass in the column
Re-read his example. He's put the "parameter" inside single-quotes making it a string literal. In the context he has presented it means nothing.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
* Reading: Developer Day 5
Never write for other people. Write for yourself, because you have a passion for it. -- Marc Clifton
My website
|
|
|
|
|
Dear Friends,
I want to connect to the SQL server 2000 from my second PC so what should I install client or server and how to connect to the server and with what setting.
Please help.
taher
|
|
|
|
|
http://www.connectionstrings.com[^] will give you a list of connection strings for various databases. Hope this helps
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
hi all,
i have a table which i wanna insert current time to sql table please tell me how to do it i wanna insert time in the following format
hhmmss
015823
regards
Ruwandi
rkherath
|
|
|
|
|
Hi
Use GetDate() or CURRENT_TIMESTAMP function to get current datetime in standard format.
The following statement gives the current date and time.
select getdate()
You can covert it to print date only:
For eg., select convert(nvarchar(10),getdate(),101)
Change the value 101 to 108 to print time.
select replace(convert(nvarchar(10),getdate(),108),':','')
--displays hh:mm:ss
To remove semi-colon, use replace() function.
select replace(convert(nvarchar(10),getdate(),108),':','')
Or
select replace(convert(nvarchar(10),current_timestamp,108),':','')
Hope you got it.
Harini
|
|
|
|
|
thx Harini, i got it. thx a lot.
regards
Ruwandi
rkherath
|
|
|
|
|
Hi,
I use mysql on my project and I can connect to mysql with my IP,this is a good thing.
But the problem is that I can't create a user.
My sintax is:
cmd1.CommandText = "GRANT ALL PRIVILEGES ON test .* TO 'myuser'@'%' IDENTIFIED BY 'mypassword' WITH GRANT OPTION;"<br />
cmd1.ExecuteNonQuery()<br />
<br />
cmd1.CommandText = "flush privileges;"<br />
cmd1.ExecuteNonQuery()
The problem is that when I connect to mysql with localhost this command works and when I connect with my IP it doesn't work.
Thank .
-- modified at 1:21 Monday 11th June, 2007
|
|
|
|
|
What is your problem you are having? You have to log in as root to create a user...
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
Hi All,
Please help on how to connect Remote Database with ASP.NET application.
i.e My application is deployed in one place and the database is placed abroad. I want to run my application connecting with that database. The database is SQL Server.
Thanks in advance.
|
|
|
|
|
Use this connectionstring
Password=sa12;persist Security Info=True;User ID=sa;Initial Catalog=Upload;Data Source=DataBaseServerName
Change the values as per ur server
|
|
|
|
|
I want to create a Make Table query from a table using MS Access
When I execute the query it should prompt for a name, and create a new table with that name. But The Problem is I don't know the way to use a parameter for that.
Do you know how to do that in Access
Thank you,
Chatura Dilan
|
|
|
|
|
Hi
i have a C# 2005 and oracle 9i database
i was install client component for the .NET from oracle 9i
but when i try to run the program he give me an error message "Need Client Component version x.x.x" where x is some number i do not remember it then
i was install client component for the .NET from oracle 10g
but he give me an error message "Can not Resolove TNS name" ?
how i can solve this problem ?????
|
|
|
|
|
I don't play with Oracle much at the moment - but have you configured the tnsnames.ora file so that the Oracle driver knows how to link to the database?
|
|
|
|
|
I am trying to write a sql query to extract an email address from a string. If this is my string:
'test@test.com [test@test.com]'
I want to return:
'test@test.com'
Can anyone help me?
|
|
|
|
|
I am not sure if you can do it in SQL Server 2000 but in SQL Server 2005 yu can use regular expressions to accomplish that...
|
|
|
|
|
Hi guys
Can anyone tell me how I can run a sql sript in visual studio 2005 for implementing a table into my database. The microsoft homepage says something about dragging the script into the reference folder but I can't seem to get it work. Is there someone who can help me...
Cheers
Al
|
|
|
|
|
For that you need a Database project which can be found under Other Project Types.
|
|
|
|
|
Hi, not an expert SQL programmer so apologies if this seems like a novice question...
Is there a way to pass multiple parameters to a select statement in an SQL stored procedure? For example:
Say you wish to select all addresses in a certain county, where the counties table is foreign-keyed to the Address table on ID. So you would write a stored proc to accept a single county ID, and select on that basis.
But say you want to pass in a range of counties, and select all addresses with a county ID in that range? It's easy to do in inline SQL, using the IN operator, so I could build a SQL string in my data access class and pass that for direct execution to the DB engine, but I'd rather stay away from that approach for obvious reasons.
The other option is to not select on county, pass all results to my .NET class, and filter the data using my list of selection values in code before passing the resultset to the client.
I think I'd prefer the latter approach but if it were possible I'd like to do the whole lot in SQL to enhance performance. It's an MS SQL 2000 database.
Does anyone out there know of a way to get around this?
All the dude ever wanted... was his rug back.
|
|
|
|
|
Hi,
You can do some thing like this.
Create Procedure <procname>
@CountyID varchar(100)
Begin
Exec ('Select * from CountyTable where countyId in ('+@CountyID+')')
End
Where @CountyID contains the comma separated list of countyId's
Hope this helps you.
rAm
i Think, i Wait, i Fast -- Siddartha
|
|
|
|
|
Yes, it is possible.
There are 3 ways to do this as mentioned here :
Click Here[^]
Regards,
Arun Kumar.A
|
|
|
|
|
I have a Database MDF file created in MSSQL 2000
and would like to convert the database file to match the
MSSQL 2005 version our company recently obtained in an upgrade.
I can connect with MSSQL 2005 to my MSSQL 2000 datbase without any problems.
However I would like the database file structure to be that of the MSSQL 2005 as I believe that would be beneficial to performance and to make use of all other features of 2005.
No.1 Can I perform this conversion.
No.2 Can this be done with MSSQL 2005 or do I need an external tool.
No.3 If an external tool is needed which one should I get ?
I would be grateful for any help.
Thank You.
|
|
|
|
|
I normally back up the database in 2000 and restore it in 2005.
You can also just detach the database from 2000 and attach it in 2005.
|
|
|
|
|
Hi,
I have 10 000 products, I have a page parameter in my aspx page. Lets say it is page=1, then I want it to bring back records 1 through 50. Then if it is page=2, then records 51 through 100 should be returned.
Is this possible in a SQL statement in SQL Server 2000?
Regards
ma se
|
|
|
|
|