How to connect to a database (any natively supported by .NET) - SQL Server 2008 or Access - from a Windows Forms application written on VC++/CLI (compiler ver. 16.0 from .NET 4.0)
I am trying to use open query to run a stored procedure in a remote database, and insert it into a table in my local database:
-- this works
exec remotesvr.sys.dbo.golden_table 'some', 'parameters'
While the above works out, I try the following:
insert into my_local_table
exec remotesvr.sys.dbo.golden_table 'some', 'parameters'
I get a SQL error to the effect of 'unable to begin a distributed transaction'.
Is there any way around this?, i.e. can I execute take the results of a remote stored procedure and put its contents in a local table?
I have a java.sql.ResultSet object containg data from a query that was run.
How do I refresh the data in the ResultSet to reflect the current data in the database?
Thanks!
In TOAD (for SQL or Oracle), there is a simple AUTOFORMAT button that will nicely format your query - I couldn't find that option in SSMS 2005, but was advised by a co-worker that it was available in SSMS 2008. I am unable to locate the option there either.
This is VERY helpful when pasting a query from another source.
Thanks for any assistance.
Query:
Select * from pu_Products where Part_Number in ('031832','027861', '028020', '033378') and User_Id = 50 and Is_Deleted = 0
The above mentioned query is in SQL and i need the query might be converted into Linq. Is there any option using the "IN" operator in Linq?. can you convert above mentioned query into Linq?
Hi,
I converted an old sql server database from 2000 to 2005 and forgetten to add old indexes to the new db.
is there any way to copy the old indexes to the new db?
any help?
How do I know when a project is just to big for MySQL and I should use something with a better reputation for scalability?
Is there a max database size for MySQL before degradation of performance occurs? What factors contribute to MySQL not being a viable option compared to a commercial DBMS like Oracle or SQL Server?
Hello all,
Is there an equivalent of MySQLs on update field for SQL server?
With both DEFAULT CURRENT_TIMESTAMP
and ON UPDATE CURRENT_TIMESTAMP
clauses, the column has the current
timestamp for its default value, and
is automatically updated.
What I am looking for is to have a date/time field and every time I update a record it updates the field with the date/time it was updated automatically?
If it doesn't exist, I guess I'll have to go manual.
Thanks all
I had to restore may database to 1 day erlier, so My database is missing data from a day before, and this databse has been used by users since the restoration.
How do I generate script/stored procedure to copy just the missing data from the backup database into my current database.
There are PK and FK relationships that need to be considering.
I'm using SQL server 2005
Thanks for your help.
Aein
I am using c# with asp.net and SQL Server 2005 as backend. I want to use dropdown list control in a form to populate a textbox. The dropdown control is linked to a column in the database. How can I code this in c#?
i want to store images of my employees with thier profiles in sql server database.
i have following reservations.
whether i should compress images or not if yes please provide me sample code or article
how should i retrieve images efficiently, i an afraid of asp.net application performance issue. i think with ten thousand employee records it will halt or slow down
I am wondering how to create or export CSV file from SQL? Is tehre any function for that similar as pgsql2shp?????
I would appreciate your ideas, tip or solutions.
I am using C#, Entity Framework and SQL Server 2008 Express.
I am connected to the database over internet.
What is the best method to speed up saving/updating data to database?
It takes 60 seconds to save 140 records to database.
hi
i have sql-server 2008 database that in the main server.
i have 10 terminals that connect to this server and work against the database.
i need that every new inserting to database through any terminal - in the server this
line will inserting to text file (every line)
can i do it ?
thank's in advance
Is there a catchall function somewhere that works well for sanitizing user input for sql injection and XSS attacks, while still allowing certain types of html tags?
What is the most standard encryption technique used in sql server for asp.net c# enterprise level application? . i am talking with respect to standards like md5 or sh1 etc, hashing
VB6 & SQL Server 2005
When i run the Windows based Software exe file,
it is showing the login page,
after login page - no screen is displaying,
I checked the task manager, in task manager it is showing as software as running,
But there is no page is appearing.
Is any firewall blocking or some other issue. But software is running with out displaying anythings.
How to solve this issue?
Hi i'm trying to manipulate the sql connection string so instead of running the original copy of our database it runs from the copy one folder up in our C# project.
I want to execute query in side the db.sql file using MySQL 5.1 in windows environment. Can any one help me to this. I want to do this by runing a bat file.
I get the following error in the query below:
#1064 - You have an error in your SQL syntax; check the manual that corresponds
to your MySQL server version for the right syntax to use near ')))' at line 1
Code Snippet:
INSERT INTO test_bans( ip, Expiration )
VALUES (
"0.0.0.0", DateAdd(
"d", 1, Date( )
)
)
Table creation query
CREATE TABLE test_bans (
ID smallint(6) NOT NULL AUTO_INCREMENT,
IP text NOT NULL,
Expiration DATETIME NOT NULL,
PRIMARY KEY (ID)
) TYPE=MyISAM;
What am I missing?
OK, see the numbers? I can barely see them because my Visual Studio 2010 theme has the backround as almost-black, and the numbers show up in the default color, which is black. I can't figure out which setting changes the color for a number in a .sql file. Does anyone know?