|
The Microsoft Jet database engine has not been ported to x64 and will not be in future. The 'Excel' provider was actually part of Jet.
As I recall you had to go through the ODBC driver in any case. The MSDA provider is no longer supported on x64 either, IIRC. You should really use OdbcConnection etc rather than OleDbConnection if you're using an ODBC driver.
Your only option, I think, is to use a 32-bit worker process. See here[^] for information.
|
|
|
|
|
i want to retrieve 10th or 20th like Nth maximum record in a table
Sathiya
|
|
|
|
|
I want people to do a quick search before posting ... but I guess we don't always get what we want :P
nth row[^]
|
|
|
|
|
DECLARE @nth as bigint
SET @nth = 10
SELECT * FROM TblA AS a WHERE @nth = (SELECT COUNT(ColA) FROM
TblB AS b WHERE b.ColA >= a.ColA)
This will return 10th Max.
change value of the variable @nth to get the required Max.
Regards
KP
|
|
|
|
|
i'm using MS SQL SERVER 2005 and this is my connection string to sqldb.
<add name="MSSQL"
="" providername="System.Data.SqlClient" connectionstring="server=xx.xxx.xx.xx;database=HR;uid=xxxxx;pwd=xxxxxx">
and now i need to connect to DB2 and i don't know how..
what should i use for providerName?
and do i need more information(e,g port) ??
please help~~~
|
|
|
|
|
You need a DB2 provider. IBM make one, which you can download from their website somewhere. We needed to connect to DB2 on an AS/400, for which the security setup in IBM's provider didn't work, so we're using a third-party one from DataDirect named DataDirect Connect for ADO.NET[^].
|
|
|
|
|
I have the following query and I am calling UDF defined function. But when i runuit it gives me following error message
Msg 229, Level 14, State 5, Line 1
EXECUTE permission denied on object 'TimeDifference', database 'twcsan', owner 'dbo'.
SELECT
tck.tcktreceived,
tck.ticketid,
tckmsg.tcktmessage,
dbo.TimeDifference(tck.tcktreceived, GETDATE())
FROM tbtickets AS tck
INNER JOIN tbticketsmessages AS tckmsg ON tck.ticketid = tckmsg.ticketid
seema
|
|
|
|
|
What User name you have used to login to DataBase...
If U Get Errors U Will Learn
If U Don't Get Errors U Have Learnt
|
|
|
|
|
Check for the owner database of the function you are referring!
Gautham
|
|
|
|
|
Hi all. A few days ago i installed mcafee total protection 2007 and that disabled my internet connection totally!! I couldn't fix it so i had to uninstall it. After uninstalling mcafee total protection 2007 still i couldn't join Internet!!
So i got mad and went and made repair installation of windows xp pro. After repair installation i couldn't activate it since Internet connection was still not working!! So i went and installed another copy of xp pro on different folder and named it WINDOWS (old one was WINDOWS2).Thanks god now i could join Internet but all my shortcuts and menu items are not visible.
Unfortunately I can't even start sql server 2000 either!! could any one tell me what should i do in order to get access to all database tables and data that i had in sql server and make a back up. I didn't install any new sql server yet. I be happy if an expert tell me what should i do. The installation folder of old windows(WINDOWS2) is still available along with sql server installation folder.Thank and looking forward for reply.
|
|
|
|
|
Somewhere in the Sql Server folders (normally under Program Files on your root drive unless you installed it somewhere else) there should be some files YourDatabaseName.MDF and YourDatabaseName.LDF.
You can take these files and from the enterprise manager 'Attach' them.
EDIT: Oh and if you hadn't guessed, stay away from mcafee products :P
|
|
|
|
|
Thanks for your reply. could you tell me the steps to attach them to new installation? I hate mcafee it created too many problems for me!!
|
|
|
|
|
Hi, im using application settings in a class library which implements a data tier. I then have a main application which references this class library. This is more of a query than a big problem, its just that when i access the settings via the ConfigurationManager in the data tier class i have to use the fully qualified class name:
i.e. it only works by typing the following:
ConfigurationManager.ConnectionStrings["AppDatabase.Properties.Settings.dbConnectionString"].ConnectionString;
why can i not just use:
ConfigurationManager.ConnectionStrings["dbConnectionString"].ConnectionString;
even though dbConnectionString exists in the settings file, it only works when it is fully qualified. I have seen many example using only dbConnectionString. Is it because i have multiple references to other class libaries in my main application?
Thanks,
Chris
|
|
|
|
|
I am very new to sql and databases.....
I am currently using Access and I have a database with about 1000 rows. I am trying to select 50 RANDOM rows at a time, how do you write an access sql statement for that? So far I have this....
SELECT*
FROM Computer
ORDER BY RND();
It returns all the results, but I just want to set it up so I can have it return as many as I want.
Please Help!
Steve Vondras
Red Lake Nation
MIS Tech
svondras@redlakenation.org
|
|
|
|
|
In sql you may try this:
select top 50 * from computer Order By NewId()
Gautham
|
|
|
|
|
Thanks for the quick response, It is still giving me the whole list it isn't cutting it down to 50.
Steve Vondras
Red Lake Nation
MIS Tech
svondras@redlakenation.org
|
|
|
|
|
Hi,
I have the following query. my message field is of datatype text. But I want to grag just first 50 characters + ...
from that "message" field. How can I do that.
The following is my sql statement
select tck.ticketid,tckmsg.message
from tbtickets tck inner join tbticketsmessages tckmsg
on tck.ticketid = tckmsg.ticketid and tcktstatusId = 1
seema
seema
|
|
|
|
|
Seema,
You can use the 'substring' function in sqlserver 2000.
select substring(column_name, start_position, length)
so your query might be:
select tck.ticketid,substring(tckmsg.message, 0, 50)
from tbtickets tck inner join tbticketsmessages tckmsg
on tck.ticketid = tckmsg.ticketid and tcktstatusId = 1
Gautham
|
|
|
|
|
you can use following :
-----------------------
CAST (tckmsg.message AS VARCHAR(50))
your query should be the following
select tck.ticketid,CAST (tckmsg.message AS VARCHAR(50))
from tbtickets tck inner join tbticketsmessages tckmsg
on tck.ticketid = tckmsg.ticketid and tcktstatusId = 1
If U Get Errors U Will Learn
If U Don't Get Errors U Have Learnt
|
|
|
|
|
Hi, i have a class library which implements a data access tier. As i used the automated designer for the dataset it automatically added an app.config in the class library with the string to the database:
<connectionstrings>
<add name="AppDatabase.Properties.Settings.dbConnectionString"
="" connectionstring="Data Source ="D:\Chris\db.sdf"" providername="Microsoft.SqlServerCe.Client">
I then use this data access class library in my main application, however how can i change and update this connection string and point it to a different file at runtime? I would like to be able to select a different database but it seems (from breakpoints in the generated table adapter code - InitConnection()) the default values are being called (in this case from the xml app config above).
How can i get, or indeed override the connection string setting for the database, whilst at the same maintain all the other settings which are in place for the main app (ie user preferences, persistent settings etc)? I tried creating a setting in the main default application of dbConnectionString, but it always picks up the one from the AppDatabase class library namespace.
Thanks in advance,
Chris
|
|
|
|
|
Move the settings from the app.cofig in your data access library to the app.config in the main applicaiton. .NET Framework will search first for a configuration file as the same name as the assembly, if not found it will use the app.config, then machine.config
only two letters away from being an asset
|
|
|
|
|
do you mean physically open the config files? i copied:
<connectionStrings>
<add name="AppDatabase.Properties.Settings.dbConnectionString"
connectionString="Data Source =D:\Chris\Debug\db.sdf"
providerName="Microsoft.SqlServerCe.Client" />
</connectionStrings>
into the app.config of the main app and all seems to be good. I guess when accessing the properties and settings through the property manager i will have to use the full namespace reference 'AppDatabase.Properties.Settings.dbConnectionString' rather than just dbConnectionString?
How come microsoft does not have an automated way to copy all the class library settings into one composite settings file when the class libaries are referenced from the main application?
Thanks so much for the help
|
|
|
|
|
Yes will need to use 'AppDatabase.Properties.Settings.dbConnectionString' because that is the name, not 'dbConnectionString'
<connectionStrings>
<add name="AppDatabase.Properties.Settings.dbConnectionString"
connectionString="Data Source =D:\Chris\Debug\db.sdf"
providerName="Microsoft.SqlServerCe.Client" />
</connectionStrings>
ConfigurationManager.ConnectionString["dbConnectionString"] will search the configuration file of the same name as the assembly if it exists, then the one in the next folder, if any, then web.config, etc.
So if the above entry was in myassembly.dll.config and this one was in app.config (or web.cofig)
<connectionStrings>
<add name="dbConnectionString"
connectionString="Data Source =D:\Chris\Debug\db.sdf"
providerName="Microsoft.SqlServerCe.Client" />
</connectionStrings>
Then ConfigurationManager.ConnectionString["dbConnectionString"] would use the app.cofing entry not the one in myassembly.dll.config.
only two letters away from being an asset
|
|
|
|
|
Mark,
you are most informative thank you. I have one final question, when i edit the projects settings in visual studio, it automatically adds the fully qualified namespace for the setting, is this default behaviour? Not that this is a problem it just means i have to fully reference the entire setting name, or i can edit the setting name and remove the AppDatabase.Properties.Settings to leave just dbConnectionString which indeed works just fine as you say.
Many thanks for your time you have saved me a big headache!
Chris
|
|
|
|
|
I couldn't find a menu item on Enterprise Manager for viewing database logs.
I meant the .ldb file [ correction: should be .ldf file ]. I would try using notepad except the file is over 700 mb.
Thanks.
-- modified at 18:27 Wednesday 20th June, 2007
|
|
|
|