|
No problem.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
u can use union,since both table has same structure
|
|
|
|
|
Shyam.r wrote: u can use union,since both table has same structure
Eh? What on earth are you blathering on about? Union? He wanted to know how to link together two tables in different databases.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Well, no, he wanted to write one connection string to two databases. He wasn't clear on what he wanted to do with it. Or even what the two database systems are. I would have asked for more information, but as he's satisfied with the answers so far, I won't bother.
|
|
|
|
|
Actually, he was clear - he stated that he also wanted to get the data with a single query.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Exelioindia wrote: how to write connection string to these databases commenly?
If both databases exist on the same SQL Server then just use the connection string to either one. NOTE: The login will have to be associated to a user on each database with sufficient right to perform the actions you want to perform.
Exelioindia wrote: also how to get data using an single query from those two database.
When you reference a table you can use a fully, or partially qualified name.
The full naming convention is:
[server].[database].[schema].[table]
You can ingore the server part.
|
|
|
|
|
select * from [Database1].[dbo].[table1],[Database2].[dbo].[table2]
in this way u can get ur data from two databases
now about the connection i didn't try doing this but im quite sure that if you connect to any one of the database (in ur case [Database1] or [Database2] ) u'll probably get the result.
Try it
happy experimenting!
|
|
|
|
|
Hai all,
can any one tell me what is SqlInjection in sql Server2005.
i Don't know any thing about it.why should we go for SqlInjection and
in which situations.
and what r the authentications done there.
Thanks
Subbu.
|
|
|
|
|
subbu.sk wrote: can any one tell me what is SqlInjection in sql Server2005
It isn't specific to SQL Server 2005. It affects all databases.
subbu.sk wrote: why should we go for SqlInjection and
in which situations.
I wouldn't advise you go for it at all. It is security hole, not something to aspire to.
Please read: SQL Injection Attacks and some Tips on How to Prevent Them[^]
|
|
|
|
|
LOL - like I could be faster than you on a SQL injection question...
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian Graus wrote: like I could be faster than you on a SQL injection question...
I have to change my signature to "I beat Christian '39904 posts and counting' Graus to answering a question on the Code Project forums"
I beat Christian '39904 posts and counting' Graus to answering a question on the Code Project forums
My website
|
|
|
|
|
Christian Graus wrote: like I could be faster than you on a SQL injection question...
He's like a greasy whippet on steroids when it comes to SQL Injection posts.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hey, I use to be pretty quick at referring people to Colin's article, but I've been kind of slacking lately
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
subbu.sk wrote: why should we go for SqlInjection
OK, you really don't understand what it is. You should search this site, there's at least two great articles on here about it.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
|
Classic!
|
|
|
|
|
SqlInjection is a powerful programming tool which, when properly leveraged, allows the developer to provide a skilled user the ability to... ummm... destroy the database.
|
|
|
|
|
Very good.
In an exceptionally skilled developer it allows them to destroy the whole server too! When I used to do SQL Server Injection Attack talks, I used to show right upto one step before formatting the hard drive on my laptop.
|
|
|
|
|
Hi,
I am using SQL Server 2005 Express Edition. It has been installed my system like name as "A". And also i have created a database like name as "MyDB".
How can i access database("MyDB") from another system like name as "B". It is in same network. I tried to access through ODBC connection. It returned TCPIP error. I have checked through give IP address for ("B") in my system ("A"). It has connected and opened successful.
Thanks in Advance
Rameshkumar Thirumalaisamy
|
|
|
|
|
SQL Server, as installed, has all remote connections disabled. You must use the configuration tools to enable TCP IP.
|
|
|
|
|
Hi,
Thank you your suggestion.
I tried to change configuration manager for enabled TCP/IP. Again the following error returned
"[Microsoft][ODBC SQL server Driver][TCP/IP Sockets]SQL server does not exist or access denied"
Thanks in Advance
Rameshkumar Thirumalaisamy
|
|
|
|
|
I want to use the text from a textBox in webform1 as input parameter in a SQL query on webform2. I'm building a website where customers can watch their unique information pulled from a SQL database. Anyone with a good idea? Thank you
Petter
|
|
|
|
|
Have you solved this problem?
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
I have a problem with my c# application. I am using a MySql Database Server, and I make a connection every time I have to make a query. I noticed that this is the cause why my application is so slow. I have done only one connection for all queries and after a while the server kills my connection. What can I do?
|
|
|
|
|
It's not much of an answer, but when I program against Sql Server I do the same thing and open a connection each time I want to perform and action. This way you only have a connection formed when it's needed. The performance of this has always been fine.
Can you quantify slow? Are we talking a few extra milliseconds or a few extra seconds?
Which ado.net provider are you using?
Are you running the DB locally? Over a network? over the internet?
Note: I've not programmed against mysql so I probably wont be able to answer, but these extra answers will help others help you with the problem.
|
|
|
|