Hi,
I have two separate appliations running on the separate infrastructure. app-a is using MYSQL as it's database server and, app-b is using MS SQL Server as database server. I have got requirement to constantly read some tables in the MS SQL server and populate some table in MYSQL server.
I got clue about setup a communication environ...
I have an .mdf file on my local box.
I have SQL Server 2008 Express and SQL Management Studio 2008 Express installed on my local box.
How in the world do I import this .mdf file as a new database into my SQL Server?
This seems like a ridiculously common task that must be performed thousands of times a day across the globe, and I canno...
This is a baffling one. My ASP.NET 3.5 app that was working fine suddenly started getting timeout errors...
System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding
...but only for requests with the correct username/password in the connection s...
Our data access layer uses command objects to communicate with sql server.
In most cases I've hard-coded the field size (that matches the column size in sql server) into the command param builder.
Such as:
SqlParameter param = new SqlParameter("@name", NVarChar, 4000);
What's the advantage to specifying a value here (4000 in this ex...
I have a SQL Server database table with a char column named "DATE" (I know, really bad, but I didn't create the database) that has dates stored in this format as strings: YYMMDD. I need to return records between these dates, so treat them as actual dates and I've tried every combination I know but still get errors. Any help is much appre...
update: This is more of a maintenance issue than the normal case.
I have the following table:
CourseId StudentId
---------------------
1 1
1 2
2 1
CourseId and StudentId are composite primary key.
Let's say I wanted to update where courseid=1 to courseid=2 for some reason. This will cause a primary k...
I need to restrict a result set for a SELECT statement based upon Col1 have 1-to-many potential values. For example, I want to return all rows where Col1 equals a value of 1, 2, and 3.
So far I have two different approaches to restricting the result set:
Approach #1
Inner Join Table1 On (Table2.ColA=Table1.ColA) And (Col1=1 And Col1=2...
I have a program with a function that retrieves a relatively short text string from one SQL database table ("html"), runs a number of regular expression queries on it, and then stores the output in another database table ("profiles"). "Html" has about 8 million records and "profiles" stores only the results. It is currently very slow -...
Here is an example to use SQLXMLBULKLOADLib.SQLXMLBulkLoad4Class -
[STAThread]
static void Main(string[] args)
{
try
{
SQLXMLBULKLOADLib.SQLXMLBulkLoad4Class objBL = new SQLXMLBULKLOADLib.SQLXMLBulkLoad4Class();
objBL.ConnectionString = "Provider=sqloledb;server=server;database=databas...
I have looked at multiple other question similarly asked on StackOverflow, but nothing seems to fit my bill. My query is slightly more complex. Essentially, I need to find the rank of the entry.
My table structure is:
TestEntry
Id, TotalTime, DateCreated
GameResult
GameId, TestEntryId, Duration, Score
QuestionResult
QuestionId, ...
Hi, I'm learning to work with ASP.net and am starting to work with databases and have a general question. I already have Access and SQL Server Express 2008 installed on my computer and have no issues adding sample databases to my programs; however, I was wondering if I would be able to open those databases in visual studio if I did not ...
We have SQL Server 2005 SP3 Enterprise 32-bit running on a Windows server 2003 Enterprise 32-bit with 32GB of RAM and 8 dual core processors. Our CPU, RAM, and I/O are always through the roof and the application is always running slow. We use AWE for buffer cache the maximum memory is 28GB, the PAGEIOLATCH_SH is always high and the proce...
I have a bunch of data in a table that serves as the parent (primary key in foreign key relationship) to several other tables. I basically want to go through this table and try and delete records that do not have children. I have already deleted the children, so there are parents that are childless.
If a record can be deleted, delete...
Hi all, I'm going crazy trying to find a FOSS free (doesn't have to be open source) ODBC driver to connect to an MS SQL Server. While it doesn't strictly have to be free (which is a huge plus, for obvious reasons), the drivers I have found haven't had an easy to find price tag.
Does anyone know of any preferably free, and if not free, t...
I use a TransactionScope in a thread to dump data in my SQL Server database.
using (TransactionScope scope = new TransactionScope())
{
// Dump data in database
scope.Complete();
}
The transaction is a long transaction (40 secondes) because data are bigs : that's normal.
When I do an Abort() to stop the thread during this tran...
I want to insert/update record with a specific stored-procedure which performs some business-logic on new record values. I can do this by trigger to ignore new record from directly to be inserted and pass new record values to my stored-procedure to perform appropriate action for passed values?
...
i have a array of strings i want to write a query such that
first it will count the Id from a particular table say products on the basis of first product names that is in the array
if the value is more than one then select the top one id from the list randomly
otherwise if the count comes one or zero then perform the same query with n...
table 1: id1, name, surname
table 2: id1, id2, value
id1 is a foreign key for table 2
What is the fastest query to find the table 1 records that do not have a record in table 2 with value = c ?
Can you please help me?
...
Hi everyone,
I am working on a website where the content has to be displayed in English, Polish, Slovak and Czech. Currently, everytime a special character used in the non-english languages (such as Á or â), it displays as just a normal A or a. I've traced the problem down to the database. Currently the collation is "Latin1_General_CI_A...
Hi,
I have been asked to build a web application to report on information stored in another system. The other system is locked down but will allow me to export data as a csv file.
I'd like to use an html form on my application so that people (the night shift!) can import data from the other system to my web application.
To allow oth...