I just updated MDAC on one of my machines and I'm now having trouble accessing my SQL server. It's a local connection using SQLOLEDB in a VB dll. It was working fine before the update and now I get:
Microsoft OLE DB Provider for SQL Server error '80004005'
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.
/cms25/CMS.asp, line 33
Most of the information I can find on this refers to TCP/IP connections but the SQL server is local. My connect function looks like this:
Hello,I am trying to update records in my database from excel data using vbaeditor within excel.In order to launch a query, I use SQL langage in ADO as follwing:------------------------------------------------------------Dim adoConn As ADODB.ConnectionDim adoRs As ADODB.RecordsetDim sConn As StringDim sSql As StringDim sOutput As StringsConn = "DSN=MS Access Database;" & _"DBQ=MyDatabasePath;" & _"DefaultDir=MyPathDirectory;" & _"DriverId=25;FIL=MS Access;MaxBufferSize=2048;PageTimeout=5;" &_"PWD=xxxxxx;UID=admin;"ID, A, B C.. are my table fieldssSql = "SELECT ID, `A`, B, `C being a date`, D, E, `F`, `H`, I, J,`K`, L" & _" FROM MyTblName" & _" WHERE (`A`='MyA')" & _" AND (`C`>{ts '" & Format(Date, "yyyy-mm-dd hh:mm:ss") & "'})"& _" ORDER BY `C` DESC"Set adoConn = New ADODB.ConnectionadoConn.Open sConnSet adoRs = New ADODB.RecordsetadoRs.Open Source:=sSql, _ActiveConnection:=adoConnadoRs.MoveFirstSheets("Sheet1").Range("a2").CopyFromRecordset adoRsSet adoRs = NothingSet adoConn = Nothing---------------------------------------------------------------Does Anyone know How I can use the UPDATE, DELETE INSERT SQL statementsin this environement? Copying SQL statements from access does not workas I would have to reference Access Object in my project which I do notwant if I can avoid. Ideally I would like to use only ADO system andSQL approach.Thank you very muchNono
using System; using System.Collections.Generic; using System.Text; using System.Data; using System.Data.OleDb; using System.Collections;
namespace TimeTracking.DB { public class sql { OleDbConnection conn;
// //the constructor for this class, set the connectionstring // public sql() { DBConnectionstring ConnectToDB = new DBConnectionstring(); conn = ConnectToDB.MyConnection(); }
// // // public void UpdateEntry(int ID, string Week, string Year, string Date, string Project, string Action, string Time, string Comment) { int m_ID = ID; int m_Week = (Convert.ToInt32(Week)); int m_Year = (Convert.ToInt32(Year)); string m_Date = Date; string m_Project = Project; int m_ProjectID = new int(); string m_Action = Action; int m_ActionID = new int(); Single m_Time = (Convert.ToSingle(Time)); string m_Comment = Comment;
// //get the project ID from the database and store it in m_ProjectID // OleDbCommand SelectProjectID = new OleDbCommand("SELECT tblProject.ProjectID FROM tblProject" + " WHERE (((tblProject.Project) LIKE @Project))", conn);
// //get the action ID from the database and store it in m_ActionID // OleDbCommand SelectActionID = new OleDbCommand("SELECT tblAction.ActionID FROM tblAction" + " WHERE (((tblAction.Action) LIKE @Action))", conn);
finally { //close the connection if (conn != null) { conn.Close(); } } } } }
Code Snippet
The update statement is not working in my application, no error in C# and no error in ms-access. When I paste the update query into the ms-access query tool and replace the parameter values (@....) with real values, is will update the record.
We are in the process to upgrading from SQL 7.0 SP1 on a NT 4 EE sp6a active/passive cluster to a SQL 2K SP2 on the same NT 4 EE sp6a active/passive (single instance I think it is called now) cluster.
My question now is about MDAC.
Do I need to upgrade all my clients (W98 SE) that actually have MDAC 2.5 installed to the 2.6 version of the product?
Is there any MS articles that clearly explain this argument?
We have a SQL Server 7.0 running on NT 4.0 with MDAC 2.1 installed.
We also have a SQL Server 2000 running on Windows 2000 with MDAC 2.6 installed, as well as other instances of 7.0 and 2000.
I am trying to setup Push replication from the box with SQL 7.0 and MDAC 2.1 installed to a 2000 server with MDAC 2.6.
A SQL 7 to 2000 push works if an instance of 7 and 2000 are installed on the same machine. I can push to any remote machine, except for the one server with MDAC 2.1 installed.
We have a large project that is importing msado21.tlb. We want to import least msado25.tlb to access the ADODB::_Stream object, but are unsure what exactly this entails. I've noticed no problems testing that change, but I cannot find any changelog for the MDAC upgrade. Is anyone aware of, or can point me to, a list of changes (fixes, modifications, caveats, etc) between MDAC 2.1 and MDAC 2.5? The binary msado file is always much newer, of course, but we want to link with the older type libraries to maintain maximum compatibility.
Using ADO.Net and SQL 2005, we have an exception handler in one of our .VB classes. We extract all the information from the exception and dump the stack into an email, but we would also like to see the query that caused the exception.
Is there an easy way to get the offending query without putting a try-catch around the hundreds of queries?
Hi folks. Got a real doozy going. One of the network techs reinstalled NT4 SP5 on a server. This reverted the SQL driver back to 2.something. Now sqlserveragent jobs will not run. I have tried to instal MDAC 2.5, but it doesn't change the driver up to the new 3.xxx driver. I searched around on here and folks said that you have to move the MDAC executable to a new directory. for the new MDAC I don't see MDAC.EXE. I did find MDAC.COM and renamed that. Tried to rerun MDAC 2.5 but still got the old SQLSRV32.Dll. Uninstalled SQLServer and reinstalled. still got the old SQLSRV32.Dll. Tried to apply SQLServer SP1. It died. Found that I am to shutdown some services. Did that. SP1 still dies. Tried to apply SQLSERVER SP2. It tries to pick up where it died and it dies again. SO, I'm currently uninstalling SQLServer, reboot, installing SQLServer, reboot, Trying SP2 again. Didn't think that it was brain surgery just to install a new flippin version of the ODBC driver.. SHEEZ!!!!
I'm in a mild-debate with some colleagues of mine. Can someone shed some light on this for me.
(This is related to a problem we are having with empty recordsets being returned where we know there should be rows returned. I think it could be caused by incorrect/outdated MDAC components.)
We use SQL 7 sp2, and ado DSN'less connection strings.
MSSQL .7.0 SP2 WIN2KPRO ATI 32mb video 1.3gh AMD 1g Ram
No other apps are affected....my once fast system is slowed to a crawl. 5+gb free on C 37gb on E and NO apps loaded in systray. NO background processes, nunca.
I installed MDAC 2.6 on a system to try to correct an OLE error when using sp_OACreate that causes an ODBC connection broken and shuts down SQL every other execution.
***** Now, the system is running slow, I tried reinstalling, moving the data to a single local drive. (No other apps appear to be slowed)
Uninstalled MDAC 2.6 and reverted to 2.5 still slow.
Reinstalling MSSQL 7 and SP2, and MDAC 2.5 still slow...
As an example, when a simple xp_cmdShell 'dir c:mssql7data*data.mdf' the resulting 10 lines are slowing typed accross the screen. On most systems the text is refreshed so fast we only see a flicker.
Cleaning the registry still slow... Profiler shows DML and GHost lines that appear to suck the life out my system, but its only pegged at 2%, like it's doing something, but what(?)
Tonight I may have to reformat and reload, however I've seen this before and would really like a clue.
Hi, I install MDAC 2.8 the installation is ok, i reboot and when i look in add/remove programs box there isn't mdac. And my entreprise manager tools don't work properly.
Hi All may be my post sounds stupid but i have on idea about it.
can some one there please clear what is relationship between MDAC and SQL Server. id MDAC part of SQL Server or it is optional tool for some thing else. what it is excatly and links to useful tutorial etc.
I am getting error Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. StackTrace> at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream) at System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) at Galileo.Modules.Data.DBDeclare.RunProcedure(String sp, IDataParameter[] parameters) at GalileoModules.Data.PrivateAccomodation.Search3.Query(String[] values
I just installed SQL7.0 on a windows 98 machine. When I go to register a new database, I get the following message. MMC caused a general protection fault
I have rebooted the machine, removed & reinstalled the application.
Does anyone know of any SQL errors that will stop the SQLserve.exe service? I meant the error didn't hang the SQL server service, it stopped the service (from green light to red light).
Extent (3:394032) in database ID 7 is allocated by more than one allocation object. The error has been repaired.
Msg 8913, Level 16, State 1, Line 2
Extent (3:394032) is allocated to 'GAM' and at least one other object.The error has been repaired.
--Lots of these
Repair: Deleted off-row data column with ID 562825134080, for object ID 1076927654, index ID 1, partition ID 72057594039566336, alloc unit ID 72057594044153856 (type LOB data) on page (3:393971), slot 28. Repair: Deleted off-row data column with ID 562825199616, for object ID 1076927654, index ID 1, partition ID 72057594039566336, alloc unit ID 72057594044153856 (type LOB data) on page (3:393971), slot 29. Repair: Deleted off-row data column with ID 562825265152, for object ID 1076927654, index ID 1, partition ID 72057594039566336, alloc unit ID 72057594044153856 (type LOB data) on page (3:393971), slot 30.
Lots of these:
Msg 8945, Level 16, State 1, Line 2 Table error: Object ID 1076927654, index ID 1 will be rebuilt. The error has been repaired. Msg 8977, Level 16, State 1, Line 2 Table error: Object ID 1076927654, index ID 1, partition ID 72057594039566336, alloc unit ID 72057594044088320 (type In-row data). Parent node for page (3:394009) was not encountered. The error has been repaired.
Can somebody guive me alittle guidance in how to make this? I have like 4 lookups but some can throw errors, and I need to know what happened when I go to the office in the moorning.
My program use the mutil-threads, each thread would use AppendChunk to insert a binary file into sqlserver. But program always stopped exceptionally , But I can not catch any exception. It looks like be killed by someone or system.
I installed MDAC 2.6 SP1 on my 2000 machine in order to get SQL server 7.0 to work properly on my machine. I'm trying to get installed on server which is on NT 4.0 SP6 so that when I save a DTS package on my 2000 machine and run it on the server it doesn't get the error client access ODBC driver not capable. I intalled MDAC 2.6 SP1 on the server but it doesn't look like its updating it. The install goes fine. I reboot but when I go into the ODBC connections and look at the driver for the client acceess it still has version 6.00.00.05 while my 2000 machine says 6.00.07.00
Any ideas on why its not updating. Can I just take the DWBODBC.DLL from my machine and copy it to the server?
While installing SQL 7.0 on nt4/sp6 it hangs during the MDAC portion. The copying of files is succesfull but when it goes to the MDAC portion it hangs.
I have a SQL 7 Server running SP2/MDAC 2.5. One of my techs accidentally loaded mdac 2.6 on a machine and it no longer could establish ODBC connections to my SQL server. I used the CC check utility to roll it back, but was wondering why the 2.6 client could no longer attach to my server. In the past I have had 2.1 on my server with 2.5 clients that connected with very few problems. At least not a major one like a failing ODBC connection. Do I need to upgrade my server to 2.6 before my clients?
Hi all, About to start a project to upgrade to MDAC 2.8 from MDAC 2.6 on a number of servers. Has anyone encountered any issues with this? Also, if we do NOT upgrade several client workstations, might we expect problems as a result?
We are aware that we need to patch MDAC for the vulnerability issues, but we are trying to comine this with a server upgrade for servers at risk. Has anyone had experience on a similar project? Cheers, Dun
I am trying to load a project under VS2005 under Windows Vista that references an ADOX wrapper that is looking for version 2.8.0.0. The reference fails because the library is not registered.
I thought maybe installing MDAC 2.8 would solve my problems, but when I run the installer for that, it briefly puts up a dialog that it is extracting files, then it disappears.