|
|
i am trying to connect to MS Access database using DSN and i am getting following error :
Microsoft OLE DB Provider for ODBC Drivers Error '80004005'
and
SQL Set Connection Attr failed
|
|
|
|
|
Ok, what language are you using?
Whats the code where your connecting?
Whats the connection string?
|
|
|
|
|
i am using VBScript
i am getting error at line where i have written
rs.open "DSNname"
|
|
|
|
|
Post all your code. No one can assist you unless you show us what you have done.
Paul Marfleet
|
|
|
|
|
Hi,
I am need of information regarding Database status during Database Refresh operation in sql server 2000.
The application uses 2 DB’s say db1 and db2. The db1 (read-write) and db2 (read only) resides in the server1. The db2 resides in server2 also.
Requirement: When the db2 in server1 is down i.e., when the DB refreshes, it throws an error and the application will not be able to access the DB tables. In that case, we should connect to the server2 and access db2.
Problem: In order to switch from server1 to server2, first we should check the status of db2 during refresh in server1.
Error during DB refresh:
Msg 927, Level 14, State 2, Line 1
Database 'Database_name' cannot be opened. It is in the middle of a restore.
If we can find the status of DB during refresh operation, this scenario can be handled and can be switched to server2.
Thanks,
Sarayu
Sarayu
|
|
|
|
|
Have you figured this out yet, or still working on it?
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
I have a table it has a name field and a rank field
Sample data
Name Rank
Amit 0
Ashish 1
Vikky 2
lalit 0
I want result back as follows
Ashish 1
Vikky 2
Amit 0
lalit 0
I want first data should be sorted on rank in ascending and than on name in ascending order for rows having rank 0
Is this feasible if yes how
|
|
|
|
|
For SQL-Server:
select Name, Rank from MyTable
order by case when Rank = 0 then 'B' else 'A' end, Name Other databases allow similar techniques.
Regards
Andy
|
|
|
|
|
Hi Ashish,
Use the below code,
create table temp#
(
assessmentid int,
appid int
)
insert into temp# select name,rank from table where rank <> 0 order by rank asc
insert into temp# select name,rank from table where rank = 0 order by name asc
select * from temp#
This will give you the output.
Regards,
Sarayu
|
|
|
|
|
Hi All
I have developed an application in which I use SQL Express 2005
All of my reports in the application are linked to database via instance name [MachineName]\OPMS
Now I want his SQL Express 2005, so that while deployment of the application, SQL Express 2005 create an instance name "OPMS" instead of SQLExpress which is infact default instance name.
Can any one please help me because I am in trouble
Regards
Muhammad Sharjeel Ahsan
|
|
|
|
|
First of all, do not hard code connection string. Secondly, you can install another version of SQLExpress with a different instance name.
Farhan Noor Qureshi
|
|
|
|
|
The connection string is no hard coded, I have placed connection string in App.Config so that user may change that string after deployment, but the problem is that Crystal report hard code the instance name of database
E.g. .\SQL2005
After deployment and during running of the application, crytal report search for that "SQL2005" So I want the SQL Express to have a user defined instance name which I first assign to All of report (under push or pull process) and then define that insance name to somewhere so that during installation of my application, tha instance name created while insallation of SQL Express, Please note that default insance name is SQLExpress but I do not need that name at all.
More over, if I install SQL Express directly then it asks for instance name but while installing as a pre requisite, it create SQLExpress.
Please reply asap
Regards
|
|
|
|
|
Hi,
I have deleted 100 rows from a SQL Database.I haven't database backup.
Is there a way to recover the DB?
Thanks in advance.
|
|
|
|
|
If you haven't got a backup of your database to restore from, you're not going to be able to retrieve your lost data.
Perhaps this will teach you the importance of taking regular backups of your database...
Paul Marfleet
|
|
|
|
|
hi everyone
plz tell me how to convert an MySQL *.sql file (CREATE TABLEs, INSERTs) to an MsSQL *.sql file, recommend software or something...
Tenx
|
|
|
|
|
Google?[^]
I've personally not used MySQL (thank god) so I've never needed to do any converstions. If it's just straight SQL then it shouldn't need converting.
|
|
|
|
|
The appropritate place for your post is the jobs board[^]
Jerry0288 wrote: Include city/state of location
City: Glasgow
State of location: Needs a bit of a clean.
|
|
|
|
|
Hi.,
I want to get a record from MS Access where a datetime field is equal to a C# DateTime type's ToShortDateString(), for example,
DateTime myTime = DateTime.Now;
string query = "SELECT * FROM myTable WHERE [date] = '" + myTime.ToShortDateString() + "'";
Now, is it correct syntax or do I need any Convert function in JET SQL ?
Is it correct to compare with C# DateTime's ToShortDateString() formatted value with JET SQL Date type field ?
I want to compare only the Date part, no Time stamp. I want to get all records for the same date I query. But if it compares also with the time part, then In fact I will not get any record in return because it is not useful to get a records for a particular second.
Would you please help me.
Thanks.
|
|
|
|
|
Need a method to call a web service from SQL passing the web service billing info and receiving back the results of the charges in xml. Its a asp page with a CustomerID and Amount parameter and returns xml for success or fail
Example
http://CreditCardSvr/processes/chargecard.aspx?customer_id=1022&amount=5.75
Response
|
|
|
|
|
Hello Everybody
I developed a console app that imports CSVs files to DataBase.
Well, I need that app runs each 2 min, then I used SQL Server Agent to create a job to do that.
But when my app raise a exception, the job can't recognize this error and enter in continuous process (looping). So the job can't execute next schedule.
When app runs successful, the ExitCode == 0.
See code below
try
{
.... code
Environment.ExitCode = 0;
}
catch(Exception e)
{
Environment.ExitCode = -1;
process.Kill();
}
finally
{
process.Close();
}
|
|
|
|
|
Have you tried out SSIS. It's pretty simple to use and you can send rows from your csv file that cause insert errors to an error file. See http://www.mridey.com/blog/Lists/Posts/Post.aspx?List=321eab0d%2De4d2%2D4523%2D914e%2D128a6688109f&ID=7
|
|
|
|
|
Hi
I have 3 tables in my database. Students , SessionTable and Campus.
Table campus have two fields
CampusId and CampusName
and SessionTable have two fields
SessionId and Sessioname
and the tble student have12 fields
they are
studentId,Name,DOB,Grade,Phone,City, campus1,Session1, campus2,Session2, campus3,Session3
I want tao take all the rows of following fields from tables
STUDENTNAME,STUDENTID,DOB,GRADE,PHONE,CITY,Campus.CAMPUSNAME AS CAMPUS1,SessionTable.SESSIONNAME AS SESSION1,CAMPUS.CAMPUSNAME AS CAMPUS2,SessionTable.SESSIONNAME AS SESSION2,CAMPUS.CAMPUSNAME AS CAMPUS3,SessionTable.SESSIONNAME AS SESSION3
I wrote a query like this . But does not takes all the rows from Database
SELECT Students.StudentID, CampusList_1.Name As Campus1, CampusList_2.Name As Campus2 , CampusList_3.Name As Campus3, Students.Session1,Students.Session2,Students.Session3,Students.StudentName as FirstName,Students.StudentLastName as LastName, Students.DateOfBirth, Students.Street,Students.AppartmentNo,Students.City, Students.State, Students.ZipCode, Students.Phone, Students.ParentFirstName, Students.ParentLastName, Students.SSN, Students.SchoolYear, Students.Semester, iif(Students.Sibling,'Yes','No')as Sibling,iif(Students.Accepted,'Yes','No')as Accepted,iif(Students.Waitlisted,'Yes','No')As Waitlisted ,Students.ApplicationDate,Students.CurrentSchool,Students.AltenatePhone From ((( Students LEFT JOIN CampusList AS CampusList_1 ON Students.Campus1 = CampusList_1.CampusID) LEFT JOIN CampusList AS CampusList_2 ON Students.Campus2 = CampusList_2.CampusID) LEFT JOIN CampusList AS CampusList_3 ON Students.Campus3 = CampusList_3.CampusID )LEFT JOIN SessionTable ON SessionTable.SessionId=Students.Session1 LEFT JOIN SessionTable ON SessionTable.SessionId=Students.Session2 LEFT JOIN SessionTable ON SessionTable.SessionId=Students.Session3
Pls help me on this issue..........
|
|
|
|
|
Try:
SELECT Students.StudentID, CampusList_1.Name As Campus1,
CampusList_2.Name As Campus2, CampusList_3.Name As Campus3,
Students.Session1, Students.Session2, Students.Session3,
Students.StudentName as FirstName,
Students.StudentLastName as LastName,
Students.DateOfBirth, Students.Street, Students.AppartmentNo,
Students.City, Students.State, Students.ZipCode, Students.Phone,
Students.ParentFirstName, Students.ParentLastName, Students.SSN,
Students.SchoolYear, Students.Semester,
iif(Students.Sibling, 'Yes', 'No') as Sibling,
iif(Students.Accepted, 'Yes', 'No') as Accepted,
iif(Students.Waitlisted, 'Yes', 'No') As Waitlisted,
Students.ApplicationDate, Students.CurrentSchool,
Students.AltenatePhone
FROM Students
LEFT JOIN CampusList AS CampusList_1
ON Students.Campus1 = CampusList_1.CampusID
LEFT JOIN CampusList AS CampusList_2
ON Students.Campus2 = CampusList_2.CampusID
LEFT JOIN CampusList AS CampusList_3
ON Students.Campus3 = CampusList_3.CampusID
LEFT JOIN SessionTable AS Session_1
ON Session_1.SessionId = Students.Session1
LEFT JOIN SessionTable AS Session_2
ON Session_2.SessionId = Students.Session2
LEFT JOIN SessionTable AS Session_3
ON Session_3.SessionId = Students.Session3
ORDER BY Students.StudentID
|
|
|
|
|
Hi all,
I am developing an windows application using .net. In that i am gettting data's from two database, how to write connection string to these databases commenly? also how to get data using an single query from those two database.
For Eg:
database1:
select id,name from table1;
database2
select id,name from table2;
Both the tables have same fields but diff table and diff database.
Plz any one suggest me how to write as single query.
Thanks in advance
Know is Drop, Unknown is Ocean
|
|
|
|
|