SQL Server Data Access ForumQuestions and discussion about data access to SQL Server using SQL Native Client, OLEDB, ODBC, ADO, WDAC/MDAC, JDBC, or SOAP/HTTP.© 2009 Microsoft Corporation. All rights reserved.Mon, 06 Jun 2011 09:51:46 Z5e806456-f67c-4874-b193-28232add9c53http://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/8514b4bb-945a-423b-98fe-a4ec4d7366eahttp://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/8514b4bb-945a-423b-98fe-a4ec4d7366ealex3001http://social.technet.microsoft.com/profile/lex3001/?type=forumOPENROWSET with Excel 2007 -- 7330 Cannot fetch a row from OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)".I am trying to use OPENROWSET with an Excel 2007 file. It seems to be partially working. Here is what I am doing:<br><br>select * FROM OPENROWSET(<br>  'Microsoft.ACE.OLEDB.12.0',<br>  'Excel 12.0;Database=C:\Test.xlsx;HDR=YES',<br>  'SELECT * FROM [DataLoad$]')<br><br>Msg 7399, Level 16, State 1, Line 1<br>The OLE DB provider &quot;Microsoft.ACE.OLEDB.12.0&quot; for linked server &quot;(null)&quot; reported an error. The provider did not give any information about the error.<br>Msg 7330, Level 16, State 2, Line 1<br>Cannot fetch a row from OLE DB provider &quot;Microsoft.ACE.OLEDB.12.0&quot; for linked server &quot;(null)&quot;.<br><br><u><b>Note that I do get back a results set with the correct field names from the Excel spreadsheet, but no rows!!<br></b></u><br>As an experiment I also saved the file in Excel 2003 format and the following query ran just fine, returning all rows:<br>select * FROM OPENROWSET(<br>  'Microsoft.Jet.OLEDB.4.0',<br>  'Excel 8.0;Database=C:\Test.xls;HDR=YES',<br>  'SELECT * FROM [DataLoad$]')<br><br>This is not really a good long term solution though, as I was not planning to switch back to Excel 2003 anytime soon.<br><br>So, any ideas on how to get this to work in Excel 2007?? I messed around with the query and the data, changing the queried ranges etc., but the results were the same every time.<br><br>Are there new extended properties I can fool around with? What else could be causing this?<br>Tue, 10 Mar 2009 19:18:12 Z2011-06-06T09:51:45Zhttp://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/bab016f3-05a3-4559-9d7b-f283365b10e2http://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/bab016f3-05a3-4559-9d7b-f283365b10e2jaistealthhttp://social.technet.microsoft.com/profile/jaistealth/?type=forumhelp meMsg 7878, Level 16, State 1, Line 1<br/> This &quot;CREATE ENDPOINT&quot; statement is not supported on this edition of SQL Server.2005<br/> <br/> help me pleaseSat, 17 Oct 2009 02:09:21 Z2011-06-06T06:19:54Zhttp://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/7e2ae8b9-ea50-4a65-bdca-077293ca6846http://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/7e2ae8b9-ea50-4a65-bdca-077293ca6846Farooq Jiwanihttp://social.technet.microsoft.com/profile/farooq%20jiwani/?type=forumUnspecified Error (MS Visual Database Tools)<p>I am trying to connect to sqlserver2008&nbsp;from sqlserver2005 (sp4) but receiving following error message when I try to right clik and open table. I can open the table by quering it but cant open by right clicking it.</p> <p>===================================</p> <p>Unspecified error<br/> &nbsp;(MS Visual Database Tools)</p> <p>------------------------------<br/> Program Location:</p> <p>&nbsp;&nbsp; at Microsoft.VisualStudio.DataTools.Interop.IDTTableDesignerFactory.BrowseTable(Object dsRef, Object pServiceProvider)<br/> &nbsp;&nbsp; at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.OpenTableNode.CreateDesigner(IDTDocToolFactoryProvider factoryProvider, IVsDataConnection dataConnection)<br/> &nbsp;&nbsp; at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.VsDataDesignerNode.CreateDesigner()<br/> &nbsp;&nbsp; at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.VsDataDesignerNode.Open()<br/> &nbsp;&nbsp; at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.VirtualProject.Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ISqlVirtualProject.CreateDesigner(Urn origUrn, DocumentType editorType, DocumentOptions aeOptions, IManagedConnection con)<br/> &nbsp;&nbsp; at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ISqlVirtualProject.CreateDesigner(Urn origUrn, DocumentType editorType, DocumentOptions aeOptions, IManagedConnection con)<br/> &nbsp;&nbsp; at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ScriptFactory.CreateDesigner(DocumentType editorType, DocumentOptions aeOptions, Urn parentUrn, IManagedConnection mc)<br/> &nbsp;&nbsp; at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.VsDocumentMenuItem.CreateDesignerWindow(IManagedConnection mc, DocumentOptions options)</p> <p>Any Ideas ?</p> <p>Farooq Jiwani.</p> <p>&nbsp;</p> <p>&nbsp;</p><hr class="sig">Farooq Jiwani Microsoft E-Learning www.microsoft.com/elearningSun, 05 Jun 2011 16:51:43 Z2011-06-06T02:54:29Zhttp://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/52727519-69c4-4ef1-8107-d6534d78b755http://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/52727519-69c4-4ef1-8107-d6534d78b755steveosmithhttp://social.technet.microsoft.com/profile/steveosmith/?type=forumDynamic SQL generation for the UpdateCommand is not supported against a SelectCommand that does not return any key column information<div>Yeah, I know, this error is all over the net. And the answer is to include a primary key in your select statement. I did, and it still isn't working. Here are details.&nbsp;</div> <div>SQL Server 2000, C# 2010, .NET Framework 4. I'm building a dataset with all three fields from my table, two of which define the primary key. When I try to update, I get the afore-mentioned error. Here's the code:</div> <div> <div style="color:Black;background-color:White;"><pre> <span style="color:Blue;">using</span> System; <span style="color:Blue;">using</span> System.Collections.Generic; <span style="color:Blue;">using</span> System.Linq; <span style="color:Blue;">using</span> System.Text; <span style="color:Blue;">using</span> System.Data.SqlClient; <span style="color:Blue;">using</span> System.Data; <span style="color:Blue;">namespace</span> SQL_Update_Test { <span style="color:Blue;">class</span> Program { <span style="color:Blue;">static</span> <span style="color:Blue;">void</span> Main(<span style="color:Blue;">string</span>[] args) { <span style="color:Green;">//Fill the dataset</span> <span style="color:Blue;">string</span> ConnStringSS = <span style="color:#A31515;">&quot;Data Source = Beta1; Initial Catalog = Kraemers_Rack; Integrated Security = SSPI&quot;</span>; <span style="color:Blue;">string</span> Query = <span style="color:#A31515;">&quot;select distinct ysnSelected, strUnitMeasure, intBatchNo from aSizeTest where intBatchNo = 10&quot;</span>; SqlDataAdapter dAdapter = <span style="color:Blue;">new</span> SqlDataAdapter(Query, ConnStringSS); SqlCommandBuilder sqlCmd = <span style="color:Blue;">new</span> SqlCommandBuilder(dAdapter); DataSet dSet = <span style="color:Blue;">new</span> DataSet(); dAdapter.Fill(dSet); <span style="color:Green;">//Make a change to the data</span> <span style="color:Blue;">for</span> (<span style="color:Blue;">int</span> i = 0; i &lt; dSet.Tables[0].Rows.Count / 2; i++) { <span style="color:Blue;">if</span> ((Boolean)dSet.Tables[0].Rows[i][<span style="color:#A31515;">&quot;ysnSelected&quot;</span>] == <span style="color:Blue;">true</span>) { dSet.Tables[0].Rows[i][<span style="color:#A31515;">&quot;ysnSelected&quot;</span>] = <span style="color:Blue;">false</span>; } <span style="color:Blue;">else</span> { dSet.Tables[0].Rows[i][<span style="color:#A31515;">&quot;ysnSelected&quot;</span>] = <span style="color:Blue;">true</span>; } } <span style="color:Green;">//Update the dataset</span> dSet.GetChanges(); <span style="color:Blue;">if</span> (dSet.HasChanges()) { <span style="color:Blue;">int</span> iChanged = dAdapter.Update(dSet); dSet.AcceptChanges(); Console.WriteLine(iChanged + <span style="color:#A31515;">&quot; rows updated&quot;</span>); } } } } </pre></div> </div> <div></div> <div>And here's SQL code to create and populate the table:</div> <div> <div style="color:Black;background-color:White;"><pre> <span style="color:Blue;">CREATE</span> <span style="color:Blue;">TABLE</span> [aSizeTest] ( [ysnSelected] [bit] <span style="color:Blue;">NULL</span> <span style="color:Blue;">CONSTRAINT</span> [DF_aSizeTest_ysnSelected] <span style="color:Blue;">DEFAULT</span> (0), [strUnitMeasure] [varchar] (25) <span style="color:Blue;">COLLATE</span> SQL_Latin1_General_CP1_CI_AS <span style="color:Blue;">NOT</span> <span style="color:Blue;">NULL</span> , [intBatchNo] [int] <span style="color:Blue;">NOT</span> <span style="color:Blue;">NULL</span> , <span style="color:Blue;">CONSTRAINT</span> [PK_aSizeTest] <span style="color:Blue;">PRIMARY</span> <span style="color:Blue;">KEY</span> <span style="color:Blue;">CLUSTERED</span> ( [strUnitMeasure], [intBatchNo] ) <span style="color:Blue;">WITH</span> <span style="color:Blue;">FILLFACTOR</span> = 90 <span style="color:Blue;">ON</span> [PRIMARY] ) <span style="color:Blue;">ON</span> [PRIMARY] GO <span style="color:Blue;">insert</span> <span style="color:Blue;">into</span> aSizeTest (ysnSelected, strUnitMeasure, intBatchNo) <span style="color:Blue;">values</span> (0, <span style="color:#A31515;">&#39;Unit1&#39;</span>, 10) <span style="color:Blue;">insert</span> <span style="color:Blue;">into</span> aSizeTest (ysnSelected, strUnitMeasure, intBatchNo) <span style="color:Blue;">values</span> (0, <span style="color:#A31515;">&#39;Unit2&#39;</span>, 10) <span style="color:Blue;">insert</span> <span style="color:Blue;">into</span> aSizeTest (ysnSelected, strUnitMeasure, intBatchNo) <span style="color:Blue;">values</span> (0, <span style="color:#A31515;">&#39;Unit3&#39;</span>, 10) <span style="color:Blue;">insert</span> <span style="color:Blue;">into</span> aSizeTest (ysnSelected, strUnitMeasure, intBatchNo) <span style="color:Blue;">values</span> (1, <span style="color:#A31515;">&#39;Unit4&#39;</span>, 10) <span style="color:Blue;">insert</span> <span style="color:Blue;">into</span> aSizeTest (ysnSelected, strUnitMeasure, intBatchNo) <span style="color:Blue;">values</span> (1, <span style="color:#A31515;">&#39;Unit5&#39;</span>, 10) <span style="color:Blue;">insert</span> <span style="color:Blue;">into</span> aSizeTest (ysnSelected, strUnitMeasure, intBatchNo) <span style="color:Blue;">values</span> (1, <span style="color:#A31515;">&#39;Unit6&#39;</span>, 10) </pre></div> </div> <div>This works great on SQL Server 2008, but errors on SQL Server 2000. Anyone have a clue why?</div> <div></div> <div>Thanks in advance,</div> <div>Steve.</div> <div></div> <div></div> <div></div> <div></div> <div></div>Sat, 04 Jun 2011 20:35:19 Z2011-06-06T06:11:32Zhttp://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/a97c2149-f2b7-4259-9118-3db54a2a4ad2http://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/a97c2149-f2b7-4259-9118-3db54a2a4ad2fisco75http://social.technet.microsoft.com/profile/fisco75/?type=forumPROBLEM POPULATING TABLE COLUMNS<p>Hi folks,</p> <p>I am developing a windows&nbsp; form Database application&nbsp; with SQL server.<br/> One of my database tables have columns with Data types as: &nbsp;uniqueidentifier and datetime.<br/> The uniqueidentifier column has Default value or Binding as : (newid()) and<br/> The datetime column has Default value or Binding as : (getdate()).</p> <p>The problem am having is that, when populating the table through DataGridView, the two columns describe above do not<br/> automatically populate the uniqueIdentifier and datetime values. Any help on how to go about this. Am really having a difficulty with this issue.</p> <p>Thank you</p>Mon, 30 May 2011 23:45:18 Z2011-06-06T00:02:03Zhttp://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/36e3b35f-c641-4da7-bedf-9ec59176f987http://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/36e3b35f-c641-4da7-bedf-9ec59176f987Randy222http://social.technet.microsoft.com/profile/randy222/?type=forumSQL Server 2005 - Repair Master Database<p>(Windows XP Professional SP3)&nbsp;Corrupted SQL Server MASTER Database - Windows automatic updates are failing for those having to do with SQL Server or Visual Studio.&nbsp;&nbsp; Recently, I was experimenting with exporting data from a Autodesk Revit application into the SQL server 2005 database on my local machine. &nbsp;Being a novice, I used the SQL &quot;Master&quot; database to export my data into. &nbsp;I'm inferring that I&nbsp;may have corrupted the MASTER&nbsp;so that Windows cannot successfully do its updates because I'm getting a failure on all updates having to do with SQL Server or Visual Studio. &nbsp;Other Windows updates seem to be OK.&nbsp;&nbsp;Do I need to repair the SQL master database?&nbsp; If so, how?</p>Fri, 03 Jun 2011 14:36:13 Z2011-06-05T20:55:48Zhttp://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/52a6ad3e-fd30-406a-9604-db75afed915bhttp://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/52a6ad3e-fd30-406a-9604-db75afed915bHasan1987http://social.technet.microsoft.com/profile/hasan1987/?type=forumHow to check if the connection droped?<p>Hi guyz;</p> <p>How can I check if the connection to sql server 2008 db hase been droped through my c# application?</p>Sat, 04 Jun 2011 15:38:16 Z2011-06-06T02:55:07Zhttp://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/87e1a2c9-6811-4c2d-9909-54733c4560fahttp://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/87e1a2c9-6811-4c2d-9909-54733c4560faribeattyhttp://social.technet.microsoft.com/profile/ribeatty/?type=forum18452 – user is not associated with a trusted SQL server connection<p style="margin:0in 0in 0pt"><span style="font-family:Times New Roman; font-size:small">Just installed SQL Server Management Studio 2008 R2. Server is (local)\sqlexpress and is set up with SQL Server and Windows Authentication mode. Under security I&rsquo;ve created a login. Created a database and under that databases security I&rsquo;ve added a new user (based on the login just created). Tried to set up a data source uses ODBC. Unser System DSN, tried to add a DSN. Selected SQL Server Native Client 10.0. Entered the DS name and description. Selected server (local). Selected authentication as with SQL Server and entered the login ID and password. Tried to connect and got failure &ndash; SQL server error 18452 &ndash; the user is not associated with a trusted SQL server connection. I&rsquo;ve done this many times with SQL Server 2000 and 2005. What am I missing? Note that I can establish and ODBC connection with a remote database.</span></p>Fri, 03 Jun 2011 14:45:54 Z2011-06-05T17:27:03Zhttp://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/363f1c3b-5932-424f-a7f4-dda64d6b1abbhttp://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/363f1c3b-5932-424f-a7f4-dda64d6b1abbNaveen Chilukahttp://social.technet.microsoft.com/profile/naveen%20chiluka/?type=forumWhat is the equivalent datatype for datetime of SQL Server 2008 in ADO?<p><strong>What is the equivalent datatype for datetime of SQL Server 2008 in ADO?</strong></p> <p><strong>The datetime datatype in SQL Server 2008 supports milliseconds. </strong> </p> <p>I am trying to execute a stored procedure that accepts a datetime parameter, with an arg with milliseconds, as input/output value.</p> <p>I am unable to convert the string that I pass in to the method as datetime value. When I do not pass in the millisecond values, the conversion happens correctly.</p> <p>I see the conversion problem in the below method.</p> <pre><code><span><span style="color:#00008b">Set</span></span><span> objpara2 </span><span>=</span><span> objCom</span><span>.</span><span>CreateParameter</span><span>(</span><span><span style="color:#800000">&quot;datetime&quot;</span></span><span>,</span><span> adDate</span><span>,</span><span> adParamInputOutput</span><span>,</span><span> </span><span>,</span><span> </span><span><span style="color:#800000">&quot;2011-01-01 11:01:01.123&quot;</span></span><span>)</span></code></pre> <code><span><span style="color:#00008b">CREATE</span></span><span> </span><span><span style="color:#00008b">PROCEDURE</span></span><span> </span><span>[</span><span>dbo</span><span>].[</span><span>TestProc</span><span>]</span><span> </span><span>@</span><span>time1 time</span><span>,</span><span> </span><span>@</span><span>datetime datetime output&nbsp;<br/> </span><span><span style="color:#00008b">as</span></span><span>&nbsp;<br/> </span><span><span style="color:#00008b">begin</span></span><span>&nbsp;<br/> &nbsp; &nbsp; </span><span><span style="color:#00008b">SET</span></span><span> NOCOUNT </span><span><span style="color:#00008b">ON</span></span><span>;</span><span>&nbsp;<br/> &nbsp; &nbsp; </span><span><span style="color:#00008b">select</span></span><span> </span><span>@</span><span>datetime </span><span>=</span><span> datetime </span><span><span style="color:#00008b">from</span></span><span> ALLTimeTypes </span><span><span style="color:#00008b">where</span></span><span> time </span><span>=</span><span> </span><span>@</span><span>time1</span><span>;</span><span>&nbsp;<br/> </span><span><span style="color:#00008b">end</span></span><span>&nbsp;<br/> &nbsp;<br/> Private Sub Command1_Click</span><span>()</span><span>&nbsp;<br/> &nbsp; &nbsp; Dim objCon </span><span><span style="color:#00008b">As</span></span><span> ADODB</span><span>.</span><span>connection&nbsp;<br/> &nbsp; &nbsp; Dim objCom </span><span><span style="color:#00008b">As</span></span><span> ADODB</span><span>.</span><span>command&nbsp;<br/> &nbsp; &nbsp; Dim objPara </span><span><span style="color:#00008b">As</span></span><span> ADODB</span><span>.</span><span>Parameter&nbsp;<br/> &nbsp; &nbsp; Dim objpara2 </span><span><span style="color:#00008b">As</span></span><span> ADODB</span><span>.</span><span>Parameter&nbsp;<br/> &nbsp; &nbsp; Dim objRS </span><span><span style="color:#00008b">As</span></span><span> ADODB</span><span>.</span><span>Recordset&nbsp;<br/> &nbsp; &nbsp; Dim k </span><span><span style="color:#00008b">As</span></span><span> Integer&nbsp;<br/> &nbsp;<br/> &nbsp; &nbsp; </span><span><span style="color:#00008b">Set</span></span><span> objCon </span><span>=</span><span> New ADODB</span><span>.</span><span>connection&nbsp;<br/> &nbsp; &nbsp; </span><span><span style="color:#00008b">Set</span></span><span> objCom </span><span>=</span><span> New ADODB</span><span>.</span><span>command&nbsp;<br/> &nbsp;<br/> &nbsp; &nbsp; objConConnectionString </span><span>=</span><span> </span><span><span style="color:#800000">&quot;Provider=SQLNCLI10;&quot;</span></span><span> _&nbsp;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span>&amp;</span><span> </span><span><span style="color:#800000">&quot;Data Source=ES-89W87BS;&quot;</span></span><span> _&nbsp;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span>&amp;</span><span> </span><span><span style="color:#800000">&quot;Database=MASTER;&quot;</span></span><span> _&nbsp;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span>&amp;</span><span> </span><span><span style="color:#800000">&quot;Integrated Security=SSPI;&quot;</span></span><span> _&nbsp;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span>&amp;</span><span> </span><span><span style="color:#800000">&quot;DataTypeCompatibility=80;&quot;</span></span><span> _&nbsp;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span>&amp;</span><span> </span><span><span style="color:#800000">&quot;User ID=sa;&quot;</span></span><span> _&nbsp;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span>&amp;</span><span> </span><span><span style="color:#800000">&quot;Password=&lt;redacted&gt;;&quot;</span></span><span>&nbsp;<br/> &nbsp;<br/> &nbsp; &nbsp; objCon</span><span>.</span><span>ConnectionString </span><span>=</span><span> objConConnectionString&nbsp;<br/> &nbsp; &nbsp; objCon</span><span>.</span><span><span style="color:#00008b">Open</span></span><span> &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<br/> &nbsp; &nbsp; MsgBox </span><span><span style="color:#800000">&quot;Connection opened&quot;</span></span><span>&nbsp;<br/> &nbsp;<br/> &nbsp; &nbsp; </span><span><span style="color:#00008b">With</span></span><span> objCom&nbsp;<br/> &nbsp; &nbsp; &nbsp; &nbsp; </span><span>.</span><span>CommandText </span><span>=</span><span> </span><span><span style="color:#800000">&quot;TestProc&quot;</span></span><span> &nbsp; &nbsp; </span><span><span style="color:#800000">'Name of the stored procedure&nbsp;<br/> &nbsp; &nbsp; &nbsp; &nbsp; .CommandType = adCmdStoredProc &nbsp;'</span></span><span>Type </span><span>:</span><span> stored </span><span><span style="color:#00008b">procedure</span></span><span>&nbsp;<br/> &nbsp; &nbsp; &nbsp; &nbsp; </span><span>.</span><span>ActiveConnection </span><span>=</span><span> objCon</span><span>.</span><span>ConnectionString&nbsp;<br/> &nbsp; &nbsp; </span><span><span style="color:#00008b">End</span></span><span> </span> <span><span style="color:#00008b">With</span></span><span>&nbsp;<br/> &nbsp;<br/> &nbsp; &nbsp; </span><span><span style="color:#00008b">Set</span></span><span> objPara </span><span>=</span><span> objCom</span><span>.</span><span>CreateParameter</span><span>(</span><span><span style="color:#800000">&quot;time1&quot;</span></span><span>,</span><span> adVarChar</span><span>,</span><span> adParamInput</span><span>,</span><span> </span><span><span style="color:#800000">50</span></span><span>,</span><span> </span> <span><span style="color:#800000">&quot;02:02:02.3456123&quot;</span></span><span>)</span><span>&nbsp;<br/> &nbsp; &nbsp; </span><span><span style="color:#00008b">Set</span></span><span> objpara2 </span><span>=</span><span> objCom</span><span>.</span><span>CreateParameter</span><span>(</span><span><span style="color:#800000">&quot;datetime&quot;</span></span><span>,</span><span> adDate</span><span>,</span><span> adParamInputOutput</span><span>,</span><span> </span><span>,</span><span> </span><span><span style="color:#800000">&quot;2011-01-01 11:01:01.123&quot;</span></span><span>)</span><span>&nbsp;<br/> &nbsp;<br/> &nbsp; &nbsp; objCom</span><span>.</span><span>Parameters</span><span>.</span><span>Append objPara&nbsp;<br/> &nbsp; &nbsp; objCom</span><span>.</span><span>Parameters</span><span>.</span><span>Append objpara2&nbsp;<br/> &nbsp;<br/> &nbsp; &nbsp; </span><span><span style="color:#00008b">Set</span></span><span> objRS </span><span>=</span><span> objCom</span><span>.</span><span><span style="color:#00008b">Execute</span></span><span> &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<br/> &nbsp; &nbsp; objRS</span><span>.</span><span><span style="color:#00008b">Open</span></span><span>&nbsp;<br/> &nbsp; &nbsp; Do </span><span><span style="color:#00008b">While</span></span><span> </span><span><span style="color:#00008b">Not</span></span><span> objRS</span><span>.</span><span>EOF&nbsp;<br/> &nbsp; &nbsp; &nbsp; &nbsp; </span><span><span style="color:#00008b">For</span></span><span> k </span><span>=</span><span> </span><span><span style="color:#800000">0</span></span><span> </span><span><span style="color:#00008b">To</span></span><span> objRS</span><span>.</span><span>Fields</span><span>.</span><span>Count </span><span>-</span><span> </span><span><span style="color:#800000">1</span></span><span>&nbsp;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Debug</span><span>.</span><span><span style="color:#00008b">Print</span></span><span> objRS</span><span>(</span><span>k</span><span>).</span><span>Name </span><span>&amp;</span><span> </span><span><span style="color:#800000">&quot;: &quot;</span></span><span> </span><span>&amp;</span><span> objRS</span><span>(</span><span>k</span><span>).</span><span>Value&nbsp;<br/> &nbsp; &nbsp; &nbsp; &nbsp; Next&nbsp;<br/> &nbsp; &nbsp; &nbsp; &nbsp; objRS</span><span>.</span><span>MoveNext&nbsp;<br/> &nbsp; &nbsp; Loop &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<br/> &nbsp; &nbsp; </span><span>...</span><span>&nbsp;<br/> </span></code>Mon, 30 May 2011 16:15:42 Z2011-06-04T08:48:50Zhttp://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/95766ede-def3-4ada-8fa4-384ad7310d0ahttp://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/95766ede-def3-4ada-8fa4-384ad7310d0afakeyhttp://social.technet.microsoft.com/profile/fakey/?type=forumData via linked server not showing cyrillic characters<p>Hi!</p> <p>I've setup a linked server to a Pervasive V8 database. The database contains cyrillic characters. When I run the query below it runs but all string fields are not correct cyrillic/bulgarian.</p> <span style="color:#0000ff; font-size:x-small"><span style="color:#0000ff; font-size:x-small"><span style="color:#0000ff; font-size:x-small"> <p>EXECUTE<span style="color:#808080; font-size:x-small"><span style="color:#808080; font-size:x-small">(</span></span><span style="color:#ff0000; font-size:x-small"><span style="color:#ff0000; font-size:x-small">'SET OWNER = ''x'';SELECT&nbsp;* FROM&nbsp;myTable'</span></span><span style="color:#808080; font-size:x-small"><span style="color:#808080; font-size:x-small">)</span></span><span style="font-size:x-small"> AT &lt;myLinkedServer&gt;</span><span style="color:#808080; font-size:x-small"><span style="color:#808080; font-size:x-small">;</span></span></p> </span></span></span> <ul> <li><span style="font-size:xx-small">I need to run the set-command so thats why I use the execute at-command.</span> </li><li><span style="font-size:xx-small">I'm running&nbsp;a SQL Express 2005.</span> </li><li><span style="font-size:xx-small">It shouldn't be anything OS or SQL specific since I can run a simple select 'солдат'-query and it shows without problem.</span> </li><li><span style="font-size:xx-small">The linked server is setup of type MSDASQL pointing to a DSN.</span> </li><li><span style="font-size:xx-small">Same DSN that Pervasive Control Center uses which works fine.</span> </li><li><span style="font-size:xx-small">I've tried both true/false at the linked server setting &quot;use remote collation&quot; without success.</span> </li></ul> <p><span style="font-size:xx-small">Any help in resolving my problem would be highly appreciated!</span></p> <br/>Mon, 09 May 2011 12:53:49 Z2011-06-03T21:43:31Zhttp://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/62998cee-8aa7-4bf3-bb37-8aad872aaf85http://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/62998cee-8aa7-4bf3-bb37-8aad872aaf85cgtyoderhttp://social.technet.microsoft.com/profile/cgtyoder/?type=forumProblems connecting to SOAP endpoint<p>Running SQL Server 2005 SP3. I have a SOAP Endpoint created, and am trying to connect to it via Android. I have been trying to fix things on the Android end, but it is now seeming like there are problems on the server side. Here is my SOAP Endpoint:</p> <p></p> <div style="color:Black;background-color:White;"><pre> <span style="color:Blue;">CREATE</span> ENDPOINT [DroidTest2] <span style="color:Blue;">AUTHORIZATION</span> [MYDOMAIN\cgtyoder] STATE=STARTED <span style="color:Blue;">AS</span> HTTP (PATH=N<span style="color:#A31515;">&#39;/dt2&#39;</span>, PORTS = (SSL, CLEAR), AUTHENTICATION = (NTLM, KERBEROS, INTEGRATED), SITE=N<span style="color:#A31515;">&#39;*&#39;</span>, CLEAR_PORT = 88, SSL_PORT = 444, COMPRESSION=DISABLED) <span style="color:Blue;">FOR</span> SOAP ( WEBMETHOD <span style="color:#A31515;">&#39;DroidFunction&#39;</span>( <span style="color:Blue;">NAME</span>=N<span style="color:#A31515;">&#39;[pubs].[dbo].[DroidFunction]&#39;</span> , <span style="color:Blue;">SCHEMA</span>=<span style="color:Blue;">DEFAULT</span> , FORMAT=ROWSETS_ONLY), BATCHES=DISABLED, WSDL=N<span style="color:#A31515;">&#39;[master].[sys].[sp_http_generate_wsdl_defaultcomplexorsimple]&#39;</span>, SESSIONS=DISABLED, SESSION_TIMEOUT=60, <span style="color:Blue;">DATABASE</span>=N<span style="color:#A31515;">&#39;pubs&#39;</span>, NAMESPACE=N<span style="color:#A31515;">&#39;http://tempuri.org&#39;</span>, <span style="color:Blue;">SCHEMA</span>=STANDARD, CHARACTER_SET=<span style="color:Blue;">XML</span>) GO </pre></div> 'DroidFunction' is a simple function which takes a string (varchar(20)) and returns another string (varchar(30)). <p></p> <p>I can get the WSDL in a browser by going to http://localhost:88/dt2?wsdl or https://localhost:444/dt2?wsdl and using HTTP authentication. However, when I use SOAP validation utilities such as <a title="soapUI" href="http://soapui.org">soapUI</a> or <a title="Web Service Studio" href="http://www.codeplex.com/WebserviceStudio"> Web Service Studio</a>, it complains about the WSDL not being formed correctly. (soapUI can't even connect to the endpoint, but it has no problem with this public sample: http://www.w3schools.com/webservices/tempconvert.asmx.)</p> <p>Are there known issues here that I am missing? What should I try next? (I realize that this is deprecated in Server 2008; I have a ton of time invested here that I would prefer not go to waste but if writing an ASP.NET web app is the only way I am going to be able to connect, then...)</p>Fri, 03 Jun 2011 21:39:10 Z2011-06-03T21:39:10Zhttp://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/0e25fea4-9fe4-4c4c-bc5e-633d4cec527dhttp://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/0e25fea4-9fe4-4c4c-bc5e-633d4cec527dseeker23http://social.technet.microsoft.com/profile/seeker23/?type=forumLinker server to Oracle returns ORA-01017 when using login mapping<p>Hello,</p> <p>I'm configuring linked server to Oracle 11g on ms sql 2005 using OraOLEDB. On &quot;Security page&quot;, when I use &quot;Be made using this security context:&quot; and provide oracle login and password everything is working. When I try to use &quot;Local server login to remote server login mapping:&quot; and use local sql server login and the same oracle login and password I receive &quot;ORA-01017: invalid username/password; logon denied&quot;. What am I doing wrong?</p> <p>Thanks,</p> <p>Igor.</p>Fri, 27 May 2011 18:28:54 Z2011-06-03T12:43:17Zhttp://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/685eacc1-a670-42d4-8392-924230fa90cbhttp://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/685eacc1-a670-42d4-8392-924230fa90cbtroy99http://social.technet.microsoft.com/profile/troy99/?type=forumWindows 7 RC ODBC Access driverMany apologies for posting here, but it's the nearset I can find. I am running the Windows 7 RC (x64) and need the MS Access 32-bit ODBC driver in order to connect to an in-house application. The driver doesn't appear to be shipped with Windows 7 and I cannot find anywhere to download it.<br/><br/>On further inspection, the 32-bit SQL Server ODBC driver appears not to ship either and I need that as well.Fri, 01 May 2009 15:19:35 Z2011-06-03T11:46:22Zhttp://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/1292679e-9f06-4acc-93b7-778d42b77877http://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/1292679e-9f06-4acc-93b7-778d42b77877Zhan James Jinyanghttp://social.technet.microsoft.com/profile/zhan%20james%20jinyang/?type=forumWill SQLTransaction Roll back if I didn't call Transaction.Commit() ?<p>HI all,</p> <p>I&nbsp;have&nbsp;some functions&nbsp;use SQLTransaction assigned with some SQLCommand, and exception happened, if i didn't rollback and directly return the fucntion without calling SQLTransaction.Commit(), will there be any possible problems?</p> <p>Using(SQLConnection conn = New SQLConnection(string))</p> <p>{</p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var Tran = Conn.BeginTransaction();</p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return;</p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Tran.Commit();</p> <p>}</p> <p>many thanks.</p><hr class="sig">JamesFri, 03 Jun 2011 07:03:41 Z2011-06-03T08:05:46Zhttp://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/9e738425-8c6e-45fc-ae0c-a63675e67506http://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/9e738425-8c6e-45fc-ae0c-a63675e67506Zhan James Jinyanghttp://social.technet.microsoft.com/profile/zhan%20james%20jinyang/?type=forumSQL Server Remote access through SSMS, Error: 10054 & Error: 64<p>I am remotely accessing the client's SQL Server but encountered below error.</p> <p>When connect through SSMS for the first time, below error shows:</p> <p><em>A connection was successfully established with the server, but then an error occurred during the login process. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.) (Microsoft SQL Server, Error: 10054)</em></p> <p>When I try the second time, we have below error:</p> <p><em>A connection was successfully established with the server, but then an error occurred during the login process. (provider: TCP Provider, error: 0 - The specified network name is no longer available.) (Microsoft SQL Server, Error: 64)</em></p> <p>Background:</p> <p>1. All firewall settings are disabled on my PC.</p> <p>2. I can ping and telnet the client's IP and Port.</p> <p>3. Have tested the connection on client side network, it works fine.</p> <p>Anyone could help?</p> <br/>Mon, 04 Apr 2011 03:59:50 Z2011-06-03T06:56:41Zhttp://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/5782bedc-c64c-4bab-8183-ba5ab3f1b1fehttp://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/5782bedc-c64c-4bab-8183-ba5ab3f1b1fePicashttp://social.technet.microsoft.com/profile/picas/?type=forumExec query on workstation!<p>Hi all!</p> <p>I try execute this on Client with Administrator account right, non default Administrator account of W7</p> <p><em>select * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',</em><br/> <em>'Excel 8.0;Database=D:\TEST1\Tem.XLS',</em><br/> <em>'SELECT * FROM [Sheet1$]')</em></p> <p>but error occured:</p> <p><em>Msg 7399, Level 16, State 1, Line 1</em><br/> <em>The OLE DB provider &quot;Microsoft.Jet.OLEDB.4.0&quot; for linked server &quot;(null)&quot; reported an error. The provider did not give any information about the error.</em><br/> <em>Msg 7303, Level 16, State 1, Line 1</em><br/> <em>Cannot initialize the data source object of OLE DB provider &quot;Microsoft.Jet.OLEDB.4.0&quot; for linked server &quot;(null)&quot;.</em></p> <p>When I execute with default Administrator account of W7, it no problem.</p> <p>I installed AccessDatabaseEngine, MS Office 2007, MS SQL Express 2005</p> <p>So, how must i do to exec it with any account in client?</p> <p>Thanks!</p>Thu, 02 Jun 2011 09:18:21 Z2011-06-03T05:43:32Zhttp://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/3399854a-7e1d-41f4-8476-c557d059542ehttp://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/3399854a-7e1d-41f4-8476-c557d059542erasmuslh27http://social.technet.microsoft.com/profile/rasmuslh27/?type=forumSQL Server 2008: Extract from DB2 Linked Server with IBM DB2 Ole provider<p>Hi</p> <p>I am part of a dedicated data warehouse (DW) team which primary source system is a DB2 mainframe. We have optimized our DW Historic layer by using a linked server to DB2. We are using SSIS as ETL-tool but have a dynamic package that creates T-SQL &quot;Insert XX Openquery('LinkedServer', SQL)&quot; syntax.&nbsp;We have a brand new server setup - with a dedicted 20 TB SAN, 4 quadcore CPU and 256 Gb rams which&nbsp;generally&nbsp;performs great.</p> <p>&nbsp;</p> <p>However, we are having some performance issues extracting data from DB2 to our Data warehouse servers using syntax like this:</p> <p>&nbsp;</p> <p></p> <p><span style="white-space:pre"></span>INSERT INTO DBDL2001.ZA06KS03HIST&nbsp;</p> <p><span style="white-space:pre"></span>(ARBLONART, DWANDTIP, FHANUM, ABPNUM, VFTODRNUM, ABPTXT, NK_KS03, ARBKORTID, ARBPRS, VFTARNKDE, MEKLONNUM, ARBVREART,&nbsp;</p> <p><span style="white-space:pre"></span>VFTRABPCT, PAPABPLIN, TIMSAT, ARBBIT, NUMSKDNUM, DMS_LINID, SAGA_LINID, SAGA_CLAIM_NO, SAGA_FDEPCT_IMP, SAGA_FDEPCT_FHA,&nbsp;</p> <p><span style="white-space:pre"></span>SAGA_FDEPCT_KUN, OPROPEIDF, OPRTIP, ANDOPEIDF, ANDTIP, SAGA_DAMAGE_CAUSE, VFTFAKDMA, ORIGIN, CODE, OBJECT_ID, BILFAC, LAC,&nbsp;</p> <p><span style="white-space:pre"></span>PACKET_REF, WSC, SAGA_PRICE ,dwSourceKey, dwExtractPeriodFromTs, dwExtractPeriodToTs, dwInsertJobId)&nbsp;</p> <p>&nbsp;</p> <p><span style="white-space:pre"></span>SELECT * FROM OPENQUERY(PRODDB2, &nbsp;</p> <p><span style="white-space:pre"></span>'SELECT &nbsp;ARBLONART, DWANDTIP, FHANUM, ABPNUM, VFTODRNUM, ABPTXT, NK_KS03, ARBKORTID, ARBPRS, VFTARNKDE, MEKLONNUM, ARBVREART,&nbsp;</p> <p><span style="white-space:pre"></span>VFTRABPCT, PAPABPLIN, TIMSAT, ARBBIT, NUMSKDNUM, DMS_LINID, SAGA_LINID, SAGA_CLAIM_NO, SAGA_FDEPCT_IMP, SAGA_FDEPCT_FHA,&nbsp;</p> <p><span style="white-space:pre"></span>SAGA_FDEPCT_KUN, OPROPEIDF, OPRTIP, ANDOPEIDF, ANDTIP, SAGA_DAMAGE_CAUSE, VFTFAKDMA, ORIGIN, CODE, OBJECT_ID, BILFAC, LAC,&nbsp;</p> <p><span style="white-space:pre"></span>PACKET_REF, WSC, SAGA_PRICE ,</p> <p><span style="white-space:pre"></span>(ltrim(rtrim(cast(FHANUM as varchar(100))))||''&curren;''||ltrim(rtrim(cast(VFTODRNUM as varchar(100))))||''&curren;''||ltrim(rtrim(cast(NK_KS03 as varchar(100)))))&nbsp;</p> <p><span style="white-space:pre"></span>as dwSourceKey, ''1900-01-01 00:00:00.000'' as dwExtractPeriodFromTs, ''2011-04-05 10:20:42.080'' as dwExtractPeriodToTs, 2320 as dwInsertJobId &nbsp;</p> <p><span style="white-space:pre"></span>FROM prod.ZA06KS03HIST &nbsp;with ur ')<span style="white-space:pre"> </span></p> <p></p> <p>&nbsp;</p> <p>The source tabels has 25 mio. rows and it takes 2 hours to extract, which is terrible considering that is takes minutes if we do a simple SSIS source destination package.</p> <p>Do any have some ideas where the bottlenecks might be or how to optimize it.&nbsp;</p> <p>&nbsp;</p> <p>kind regards</p> <p>Rasmus</p> <p>&nbsp;</p> <p>&nbsp;</p>Tue, 31 May 2011 08:55:45 Z2011-06-03T02:24:08Zhttp://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/05662414-8993-4346-97a6-8c8ad3b1e408http://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/05662414-8993-4346-97a6-8c8ad3b1e408Mhretab Kidanehttp://social.technet.microsoft.com/profile/mhretab%20kidane/?type=forumODBC 3700 error<p>Hi,</p> <p>&nbsp;&nbsp;&nbsp;&nbsp; I am trying to connect to MS-SQL SERVER 2008 R2 using ODBC in php, It connects to master but dispaly error 3700 for other database. Can any one help me sort the issue? <br/> here is the code I use<br/> &nbsp;$conn=odbc_connect('caldsn','','');<br/> &nbsp;&nbsp;&nbsp; if(!$conn)<br/> &nbsp;&nbsp;&nbsp; { <br/> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; echo&quot;&lt;br /&gt;1 Error connecting to MsSql &quot;.odbc_error() ;<br/> &nbsp;&nbsp;&nbsp; }</p>Thu, 02 Jun 2011 13:17:23 Z2011-06-03T02:19:58Zhttp://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/ae849959-b31f-4984-b54f-45dd38fdddf7http://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/ae849959-b31f-4984-b54f-45dd38fdddf7CraigWasHerehttp://social.technet.microsoft.com/profile/craigwashere/?type=forumWindows 7 SP1 Slows IP connection to SQL Server<p>Hello,</p> <p>The installation of Win7 SP1 causes IP connections to remote SQL Server 2005 database to become extremely slow. Queries that previously took 1/2 second now take 2 minutes. The slowness is experienced within the VS 2010 environment as well as connecting with SSMS.</p> <p>Does anyone know the fix for this?</p> <p>Thank you,</p> <p>Craig</p>Tue, 31 May 2011 17:36:21 Z2011-06-03T02:18:46Zhttp://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/e919cc88-21d5-4919-a970-10af04024153http://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/e919cc88-21d5-4919-a970-10af04024153Denver,COhttp://social.technet.microsoft.com/profile/denver,co/?type=forumBetween Condition in C# Express<p>Hello guys,</p> <p>What I have in my form is this: after the user selects his height from drop down menu, he enters his weight in a text box... then the result should be retrieved from database where the selected height has a specific range of weight.</p> <p>For example: if his Height 1.397 M, his weight should be between 80-102 LB.</p> <p>Therefore I made 4 columns in my database ( Height, Minimum Weight, Maximum Weight, Risk Percent).</p> <p>I want to make a query whereas the weight between this range.</p> <p>Select Risk from table where weight between Minimum Weight and Maximum Weight</p> <p>&nbsp;</p> <p>Your help would be grateful..</p> <p>Thanks,</p> <p>Denver,CO</p>Thu, 02 Jun 2011 22:23:57 Z2011-06-03T00:58:39Zhttp://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/8ed7c93c-ff7b-4a3b-9c9f-80edd8534fb7http://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/8ed7c93c-ff7b-4a3b-9c9f-80edd8534fb7Denver,COhttp://social.technet.microsoft.com/profile/denver,co/?type=forumRange in Database using C# Express <div style="color:#000000; font-family:Verdana,Arial,Helvetica,sans-serif; font-size:10px; margin:8px; background-color:#ffffff"> <p>Hello dudes :)</p> <p>I need your help as always. I do not know how to use a range datatype in the database of C# Express. For example, if I have in my table two columns one of them for the hight (PK) and the second is the weight. If the user entered in the textbook his weight and hight, it will be searched in the database if this weight is for this height. For example if you're 5 inches, your weight should be 22lb - 38 lb for example.</p> <p>Any help would be grateful.</p> <p>Thanks always,</p> <p>Denver,CO</p> </div>Mon, 23 May 2011 18:35:38 Z2011-06-02T22:42:36Zhttp://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/63961cda-09d1-4b6b-9ed7-2ccac939ca2dhttp://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/63961cda-09d1-4b6b-9ed7-2ccac939ca2ddhoogerhttp://social.technet.microsoft.com/profile/dhooger/?type=forumCan SAP BI connect to SQL Server 2005 and read tables and columns NOT in upper case?<p align=left><font face=Arial size=2>An IBM Global Services consultant is telling my client that in order to have SAP BI read any data from any other application supported by SQL Server 2005, that all tables and fields MUST be in UPPER CASE. This would mean that SAP BI could not read ANY data from AdventureWorks (which everyone needs <img src="http://forums.microsoft.com/MSDN/WebResource.axd?d=NySzF1eivP_rMoc50GQJzcvS4MHMOEKwYrCIgDtzuzlw7GsNki3H_INlfYaLgkxFdA4ESFRtesEUXj11MHjIL5WMBvm3Pubiu_iWcnqAaGQ1&amp;t=633337194230757564">) but more importantly from 95% of applications written and stored on SQL Server. I find this to be ludicrious, frankly, but don't know how to find out if it is true. Anyone?</font></p>Fri, 25 Apr 2008 03:14:22 Z2011-06-02T15:07:32Zhttp://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/1fdac060-cff0-440a-b897-3669de63362chttp://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/1fdac060-cff0-440a-b897-3669de63362cDiaanhttp://social.technet.microsoft.com/profile/diaan/?type=forumVisual Studio .Net 2005 and sqlServer 2008<span style="font-family:Times New Roman; font-size:small"></span> <p style="margin:0cm 0cm 0pt"><span style="font-family:Arial; font-size:16pt">Will I be able to connect to a sql Server 2008 database with Visual Studio .Net 2005 (Professional Edition)?</span></p> <span style="font-family:Times New Roman; font-size:small"></span> <p style="margin:0cm 0cm 0pt"><span style="font-family:Arial; font-size:16pt">My operating system is Windows 7 (Ultimate Edition).</span></p> <span style="font-family:Times New Roman; font-size:small"></span>Thu, 02 Jun 2011 12:28:32 Z2011-06-02T14:25:14Zhttp://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/fdc4905f-c33f-4ee5-9d2c-a45f8d202684http://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/fdc4905f-c33f-4ee5-9d2c-a45f8d202684Reddaiahhttp://social.technet.microsoft.com/profile/reddaiah/?type=forumNeed Help in SQL Bulk Insert<p>Hi Friends,</p> <p>Could any one help me to insert data from the file which contains header , acutal data to be insert and footer</p> <p>please find the file format below for your referance.</p> <p><span style="font-size:x-small; font-family:Courier New">START-OF-FILE</span> <br/> <span style="font-size:x-small; font-family:Courier New">RUNDATE=20110527</span> <br/> <span style="font-size:x-small; font-family:Courier New">REPLYFILENAME=CADMarketPrice.out</span> <br/> <span style="font-size:x-small; font-family:Courier New">FIRMNAME=dl426512</span> <br/> <span style="font-size:x-small; font-family:Courier New">DATEFORMAT=yyyymmdd</span> <br/> <span style="font-size:x-small; font-family:Courier New">COMPRESS=yes</span> <br/> <span style="font-size:x-small; font-family:Courier New">PROGRAMNAME=getdata</span> <br/> <span style="font-size:x-small; font-family:Courier New">PROGRAMFLAG=one-shot</span> <br/> <span style="font-size:x-small; font-family:Courier New">SECMASTER=yes</span> <br/> <span style="font-size:x-small; font-family:Courier New">CLOSINGVALUES=yes</span> <br/> <span style="font-size:x-small; font-family:Courier New">DERIVED=yes</span> <br/> <span style="font-size:x-small; font-family:Courier New">START-OF-FIELDS</span> <br/> <span style="font-size:x-small; font-family:Courier New">FX-RATE</span> <br/> <span style="font-size:x-small; font-family:Courier New">END-OF-FIELDS</span> <br/> <span style="font-size:x-small; font-family:Courier New">TIMESTARTED=Fri May 27 02:37:22 EDT 2011</span> <br/> <span style="font-size:x-small; font-family:Courier New">START-OF-DATA</span> <br/> <span style="font-size:x-small; font-family:Courier New">CME|993|1|</span> <br/> <span style="font-size:x-small; font-family:Courier New">CHF|928|1|</span> <br/> <span style="font-size:x-small; font-family:Courier New">LOR|658|1|</span> <br/> <span style="font-size:x-small; font-family:Courier New">TEM|428|1|</span> <br/> <span style="font-size:x-small; font-family:Courier New">SAE|158|1|</span> <br/> <span style="font-size:x-small; font-family:Courier New">END-OF-DATA</span> <br/> <span style="font-size:x-small; font-family:Courier New">TIMEFINISHED=Fri May 27 02:37:25 EDT 2011</span> <br/> <span style="font-size:x-small; font-family:Courier New">END-OF-FILE</span></p> <p><span style="font-size:x-small; font-family:Courier New">I need to insert the data which is present in between 'START-OF-DATA'<span style="font-size:xx-small; font-family:Verdana"> and '</span><span style="font-size:x-small; font-family:Courier New">END-OF-DATA'</span><span style="font-size:xx-small; font-family:Verdana"> Tags in the table.</span></span></p> <p><span style="font-size:x-small; font-family:Courier New"><span style="font-size:xx-small; font-family:Verdana">Could any on help me on this,</span></span></p> <p><span style="font-size:x-small; font-family:Courier New"><span style="font-size:xx-small; font-family:Verdana">Thanks in advance</span><br/> </span></p>Tue, 31 May 2011 08:53:29 Z2011-06-02T07:47:48Zhttp://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/820ceddb-d4a8-4772-ae75-ef46007a8c30http://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/820ceddb-d4a8-4772-ae75-ef46007a8c30Hemanshu Bhojakhttp://social.technet.microsoft.com/profile/hemanshu%20bhojak/?type=forumSQL Server crashes when remote query fails<span style="font-family:Arial, Helvetica, sans-serif;font-size:14px;border-collapse:collapse;line-height:18px"> <p style="margin-top:0px;margin-right:0px;margin-bottom:1em;margin-left:0px;font-size:14px;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;padding:0px;border:0px initial initial"><strong style="font-size:14px;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;font-weight:bold;padding:0px;margin:0px;border:0px initial initial">Setup:</strong> I have a linked server setup on SQL Server 2005 which is pointing to an Oracle DB. The linked server has RPC (Both RPC &amp; RPC Out) enabled.</p> <p style="margin-top:0px;margin-right:0px;margin-bottom:1em;margin-left:0px;font-size:14px;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;padding:0px;border:0px initial initial"><strong style="font-size:14px;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;font-weight:bold;padding:0px;margin:0px;border:0px initial initial">Problem:</strong> When a query throws an exception on the remote server (Oracle DB) the SQL Server instance crashes. The logs say that the crash was due to some problem with the RPC call. Is there a way in which I can prevent the entire server to collapse but also use RPC over my linked server.</p> </span>Mon, 17 Aug 2009 12:29:45 Z2011-06-02T04:41:11Zhttp://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/647f38cb-1acc-4d02-b817-a756e99f4fdehttp://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/647f38cb-1acc-4d02-b817-a756e99f4fdeStefano Ghttp://social.technet.microsoft.com/profile/stefano%20g/?type=forumWe appear to be encountering lock escalation with our application. How do we eliminate this behaviour?<p>We have a rather large Java application (using JDK 1.6 and Microsoft SQL Server JDBC Driver 2.0, version 2.0.1803.100) interfacing with SQL Server 2008.&nbsp; Our isolation level is set to &quot;committed read&quot;.</p> <p>Our application is designed&nbsp;to chain together a series of services to&nbsp;process a given request.&nbsp; Each service in the chain is invoked by inserting a record in a designated table.&nbsp; This is done in the same database transaction as the work done by the individual service.&nbsp; It is critical for our application that the locks are kept at the <strong>row</strong> level.</p> <p>With some volume, we are finding that two services in the chain are competing for database locks.&nbsp; We believe that SQL Server is escalating the locks from row to page even though we have specified lock hints on all our insert, update, delete and select-for-update SQLs, as follows ...</p> <ul> <li>insert - with rowlock </li><li>update - with rowlock, holdlock </li><li>delete - with rowlock </li><li>select-for-update - with updlock, rowlock, holdlock </li></ul> <p>Our tables use identity columns.&nbsp; Could this be the cause of the escalation?&nbsp; Could it be due to an under-powered server?</p> <p>&nbsp;</p>Tue, 24 May 2011 21:15:36 Z2011-06-02T03:23:41Zhttp://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/7b8e1622-6208-470e-ba62-d2ba2dc111a2http://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/7b8e1622-6208-470e-ba62-d2ba2dc111a2silnahttp://social.technet.microsoft.com/profile/silna/?type=forumSQL Query on Excel Sheet Returns only 255 chars Hi<br/> <br/>I have used the foll. SQL Query to Select Data from Excel Sheet<br/><span style="font-size:x-small;color:#008000"><span style="font-size:x-small;color:#008000"><font size=2 color="#008000"><font size=2 color="#008000"> <p>SELECT [Description] FROM OPENROWSET ( 'Microsoft.Jet.OLEDB.4.0','Excel 8.0;Database=C:\SourceExcel.xls', Sheet1$)</p> </font></font></span><font size=2 color="#008000"> <p> </p> </font></span> <p><br/><br/>Where [Description] is a column in .xls file<br/><br/>The SQL Query Runs without any Errors but gets only <strong>255 chars as output. <br/></strong>My Description Column contains more Than <strong>255 chars .How to get more than 255 chars as output ???<br/></strong><br/>Plz help....<br/><br/>Thanks<br/>anliS</p><hr class="sig">Regards anliS www.businessinsightsconsulting.comWed, 13 May 2009 09:16:12 Z2011-06-01T16:37:09Zhttp://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/b106abfd-11ac-40c5-9855-2d25a0fbc118http://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/b106abfd-11ac-40c5-9855-2d25a0fbc118DK Technologieshttp://social.technet.microsoft.com/profile/dk%20technologies/?type=forumSystem.Data.SqlClient.SqlException: Login failed for user <p>I have an ASP application running on SQL Server 2008 R2, I get this error when users attempt to access what I am assuming is the SQL database, I have added the user in question. However I still get the error below and the Stack Trace. I am pretty new to SQL server and could use some help.</p> <strong>Exception Details: </strong>System.Data.SqlClient.SqlException: Login failed for user 'shunts'.<br/> <br/> <strong>Source Error:</strong> <br/> <br/> <table width="100%" bgcolor="#ffffcc"> <tbody> <tr> <td><code>An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.</code></td> </tr> </tbody> </table> <br/> <strong>Stack Trace:</strong> <br/> <br/> <table width="100%" bgcolor="#ffffcc"> <tbody> <tr> <td> <pre>[SqlException (0x80131904): Login failed for user 'shunts'.]<br/> System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) &#43;6277312<br/> System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() &#43;412<br/> System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) &#43;1363<br/> System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) &#43;53<br/> System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, TimeoutTimer timeout) &#43;6292062<br/> System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, TimeoutTimer timeout, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) &#43;6291977<br/> System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) &#43;352<br/> System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) &#43;831<br/> System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) &#43;49<br/> System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) &#43;6293782<br/> System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) &#43;78<br/> System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) &#43;1922<br/> System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) &#43;89<br/> System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) &#43;6296606<br/> System.Data.SqlClient.SqlConnection.Open() &#43;300<br/> System.Web.DataAccess.SqlConnectionHolder.Open(HttpContext context, Boolean revertImpersonate) &#43;150<br/> System.Web.DataAccess.SqlConnectionHelper.GetConnection(String connectionString, Boolean revertImpersonation) &#43;4602223<br/> System.Web.Security.SqlMembershipProvider.GetPasswordWithFormat(String username, Boolean updateLastLoginActivityDate, Int32&amp; status, String&amp; password, Int32&amp; passwordFormat, String&amp; passwordSalt, Int32&amp; failedPasswordAttemptCount, Int32&amp; failedPasswordAnswerAttemptCount, Boolean&amp; isApproved, DateTime&amp; lastLoginDate, DateTime&amp; lastActivityDate) &#43;3667415<br/> System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved, String&amp; salt, Int32&amp; passwordFormat) &#43;189<br/> System.Web.Security.SqlMembershipProvider.ValidateUser(String username, String password) &#43;202<br/> System.Web.UI.WebControls.Login.AuthenticateUsingMembershipProvider(AuthenticateEventArgs e) &#43;225<br/> System.Web.UI.WebControls.Login.AttemptLogin() &#43;166<br/> System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e) &#43;93<br/> System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) &#43;52<br/> System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) &#43;3691<br/></pre> </td> </tr> </tbody> </table> <p>&nbsp;</p>Mon, 30 May 2011 19:10:19 Z2011-06-01T05:42:24Zhttp://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/104c598b-4c96-4c75-8965-f74043748132http://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/104c598b-4c96-4c75-8965-f74043748132dudskiehttp://social.technet.microsoft.com/profile/dudskie/?type=forumMicrosoft OLE DB Provider for ODBC Drivers 80004005<p>Hello guys,</p> <p>I have this specific error when I tried to connect to a database:</p> <p><span style="font-family:Arial; font-size:14px"><strong>Microsoft OLE DB Provider for ODBC Drivers 80004005</strong><br/> <strong>[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified</strong><br/> <strong>/Libraries/Data/dtaAccess.asa, line 60</strong></span></p> <p>The weird thing is, there is one database that has this error. I have five databases, with the same connection string, but it works fine. This database is the only problem. Is there I need to figure out in SQL Server Management Studio, on why this one database does not work with connection string.</p> <p>&nbsp;</p> <p>Thanks,</p>Mon, 30 May 2011 04:22:05 Z2011-06-01T05:24:05Zhttp://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/633ecb4f-37d5-43ac-960b-5106465b46eahttp://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/633ecb4f-37d5-43ac-960b-5106465b46eamanojgarghttp://social.technet.microsoft.com/profile/manojgarg/?type=forumerror 18452, Login failed for user Reason: Not associated with a trusted SQL Server connection.<span id="Showtread1_ThreadRepeater__ctl1_lblFullMessage">Hi all,<br />I have two servers running windows 2003 and both having sql server 2000.<br />I want to establish a linked server between all of them.<br />i created them . but now when accessing the data from those server the following error is being displayed<br /><br /><br /><b>Server: Msg 18452, Level 14, State 1, Line 1<br /> Login failed for user 'manoj'. Reason: Not associated with a trusted SQL Server connection.</b><br /><br /><br />i have enabled mixed mode authentication.even then its not displaying the intended result.<br /><br />please respond is urgent.<br /><br />thanks.</span>Mon, 05 Sep 2005 05:21:11 Z2011-06-01T00:23:21Zhttp://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/40496e39-9630-4757-94de-3987a2c0753ehttp://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/40496e39-9630-4757-94de-3987a2c0753eBK_SQLhttp://social.technet.microsoft.com/profile/bk_sql/?type=forumSQL Server Agent Log error<p>Hi,</p> <p><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;; color:black; font-size:7.5pt">We just migrated databases from SQL 2005 to SQL 2008 R2 cluster environment. There are no issues with the migrated databases and all SQL jobs are running normally without any error. However, following errors are logged frequently in SQL Server Agent Error Logs. </span></p> <p><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;; color:black; font-size:7.5pt">2011-05-23 14:30:04 - ! [165] ODBC Error: 0, Named Pipes Provider: Could not open a connection to SQL Server [2]. [SQLSTATE 08001] <br/> 2011-05-23 16:00:03 - ! [165] ODBC Error: 0, Named Pipes Provider: Could not open a connection to SQL Server [2]. [SQLSTATE 08001] </span></p> <p><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;; color:black; font-size:7.5pt">The named pipe is enabled on the server. There was no alias set up on The SQL Agent Properties. I added the cluster name as the alias but still getting the same error. The SQL Server Agent is functioning&nbsp;correctly; however, the error message is annoying. Any help will be appreciated. </span></p> <p><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;; color:black; font-size:7.5pt">Thanks,</span></p> <p></p> <p>Thanks,</p> <p>Bhuwan</p> <p>&nbsp;</p> <p></p>Wed, 25 May 2011 17:45:01 Z2011-05-31T23:20:59Zhttp://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/9980b542-99ad-4fc5-bf52-0a3f94d2de08http://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/9980b542-99ad-4fc5-bf52-0a3f94d2de08Denver,COhttp://social.technet.microsoft.com/profile/denver,co/?type=forumSharing Object between forms in C# Express<p>Hello every body,</p> <p>I've question and I need your help. How can I create a sharing object between many forms in C# Express?</p> <p>&nbsp;</p> <p>Thanks,</p> <p>Denver,CO</p>Tue, 31 May 2011 16:49:44 Z2011-06-01T00:26:38Zhttp://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/1fba95ae-6359-4c5c-b966-aed52348827chttp://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/1fba95ae-6359-4c5c-b966-aed52348827cANBUJhttp://social.technet.microsoft.com/profile/anbuj/?type=forumConnect to SQL Server 2005 express From C#.Net Windows Application Via Internet<p>I've developed a windows application using C#.Net(VS 2008) which uses MS Sql Server 2005 as server. It is running properly in LAN. I'm using SQL Server authentication to connect the DB. SO the connection String looks like</p> <p><strong>&quot;initial catalog=TestDB;data source=&quot; compName/SQLExpressRAD;Connect Timeout=30;User Id=sa;Password=123456;&quot; </strong></p> <p>MS SQL Server 2005 installed in a PC running Windows Vista which is work station having a static IP address. So First I tried to connect from SQL Server Management Express using the following settings.</p> <p>SQL Server Authentication</p> <p>User Name&nbsp; sa</p> <p>Password abcdef</p> <p>Server Name&nbsp; 10.xx.x.xx/compName/SQLExpressRAD,51267</p> <p>&nbsp;</p> <p>I've added the port 51267 in server, TCP/IP enabled, and created the rule in firewall to open the port..</p> <p>Referred :- http://msdn.microsoft.com/en-us/library/cc646023.aspx</p> <p>But I was unable to connect it. Now, my request is <strong>&quot;How can I connect to that server from my application?&quot;</strong>. Please give the instructions to configure the DB and the proper Connection String..</p> <p>&nbsp;</p> <p>Note:- Is there anything else I must change in my application in order send and receive data via internet. I came a cross something like serialization using XML or something..</p> <p>&nbsp;</p>Fri, 27 May 2011 05:47:12 Z2011-05-31T16:46:30Zhttp://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/f1ee588e-42d4-42e1-8e4b-bbb0b48c1a8bhttp://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/f1ee588e-42d4-42e1-8e4b-bbb0b48c1a8bLanceAckhttp://social.technet.microsoft.com/profile/lanceack/?type=forumHebrew characters using MSDAORA<p>Hi, <br/> I have successfuly set-up a connection from Sql Server 2008 R2 using the MSDAORA&nbsp;provider to link and transfer data between an Oracle database to SQL Server. I am able to access the records in Oracle, however, all the fields that contain Hebrew characters appear as gibberish. I changed the font in Tools-&gt;Options-&gt;Fonts and colors to a appropriate Hebrew font, but this didn't help.</p> <p>Has anyone an idea how this issue can be solved?</p> <p>TIA,<br/> Lance</p> <p>&nbsp;</p> <p>&nbsp;</p>Thu, 26 May 2011 10:22:07 Z2011-05-31T04:51:08Zhttp://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/8fbcbce4-99ba-4543-b75e-7ef7fa7617f8http://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/8fbcbce4-99ba-4543-b75e-7ef7fa7617f8tango209http://social.technet.microsoft.com/profile/tango209/?type=forumError: 26 through service, but not iis or exe<p>Hello,</p> <p>I'm getting the following error when trying to connect to SQL Server 2008 R2 named instance through a service running under Local System, but not when accessing it through an exe or asp.net page using the same connection string:</p> <p>A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)</p> <p>The SQL Server is running on the same machine as the service, exe, and IIS.&nbsp; I've also tried named pipes and I still get the same problem (Error 40 though instead of 26).&nbsp; Sql Browser is running and returned information when I ran portqry.</p> <p>Any help would be appreciated.</p>Mon, 30 May 2011 08:36:36 Z2011-05-30T18:46:25Zhttp://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/f2d4cc4a-a3d9-4685-8ee2-0d4db05d3565http://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/f2d4cc4a-a3d9-4685-8ee2-0d4db05d3565Rebecca on MSNhttp://social.technet.microsoft.com/profile/rebecca%20on%20msn/?type=forumTechNet Version on LAN/WAN<p>I have installed the Technet 64 bit version of SQL Server 2008 R2 on Windows Server 2008 R2. While I can query Adventureworks in Management Studio, I cannot make an ODBC connection to it from any other box on my LAN (Windows 7 Pro and some Macs using Actual Technologies drivers). Port 1433 is open and pointed correctly, and the named instance is set to accept TCP/IP connections. I am starting to think that the Technet version just won't allow external connectivity.</p> <p>&nbsp;</p> <p>I have 3 questions:</p> <p>1 - How can I tell what version I have and then find out what it allows?</p> <p>2 - How can I verify that the OCBC driver on the Windows 7 box is the correct one? It is SQL Server Native client 10.0. When I try to set up a DSN, it sees the server (i.e., the name of the machine) but not the named instance. It times out when I try to connect to the server.</p> <p>3 - If the current version is not, in fact, sufficient, which of the millions of versions would I need to purchase? My goal is to use it for my own development use, but allow single connections from either side of the firewall.</p> <p>Thank you,</p> <p>Rebecca</p>Sun, 29 May 2011 17:15:09 Z2011-05-30T17:41:29Zhttp://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/1741757d-845f-4e9d-a863-f8339cb5d3edhttp://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/1741757d-845f-4e9d-a863-f8339cb5d3edmeridius10http://social.technet.microsoft.com/profile/meridius10/?type=forumAdd Connection Server Name - Visual Studio 2008<p>I am having problems connecting Visual Studio 2008 to SQL Server 2008 R2 Express. The Server Name doesn't appear in the Server name box of Add Connection, even after trying to refresh. Windows 7 has been fully updated except for SP1, so I'm not sure that is the problem.</p> <p>Looking at other forums, it appears that there is a known problem here?!</p> <p>&nbsp;</p> <br/>Fri, 27 May 2011 21:35:30 Z2011-05-30T06:02:11Zhttp://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/701e612a-c9d5-4ac0-8395-fb494cd43da3http://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/701e612a-c9d5-4ac0-8395-fb494cd43da3PhilDeGuz04http://social.technet.microsoft.com/profile/phildeguz04/?type=forumSQL Connection ALways Fail on the First Try<p>Hi,</p> <p>&nbsp;</p> <p>I' am having issues with SQL Server 2008 R2. It is installed on a Virtual Machine within an SBS DOmain . It is strange that there is always a Time out Expired Error on the Initial Try of My Applications when trying to Connect to the SQL Server instance. Tried it also using SQLCMD and the same thing at first there is a Time Out Error and then the nExt or Third Try it will be OK and it will work smoothly again until i close the Application that im using. But when i Tried Again to Open An Application that access the SQL Server instance the same thing again Time Out Error. It Seems that the problem exists on the Initial Connection try of Every Application that i Have.</p> <p>Does anyone experienced such problems. And what is actually wrong. Im using a Named SQL Instance.</p>Sun, 29 May 2011 12:50:56 Z2011-05-30T03:10:48Zhttp://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/50871535-796e-4bbb-9e89-c4101c70fdc7http://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/50871535-796e-4bbb-9e89-c4101c70fdc7dshiffhttp://social.technet.microsoft.com/profile/dshiff/?type=forumJoin two tables and pivot results from one<p>I have been struggling with this for hours. I have to join two tables and pivot the results from the 2nd table</p> <p>TableA<br/> ========<br/> ClaimID - unique identifier<br/> ClaimNumber<br/> InjPartySSN</p> <p>TableB<br/> =========<br/> ClaimID - not unique<br/> <span style="font-size:x-small">ICDDiagnosisCode - not unique<br/> SequenceNumber - not unique</span></p> <p><span style="font-size:x-small">*But the combo of the ClaimId &#43; SequenceNumber would be unique</span></p> <p><span style="font-size:x-small"></p> <pre>select A.ClaimId, ClaimNumber, InjPartySSN, ICDDiagnosisCode from TableA A, TableB B Where A.ClaimId = B.ClaimId</pre> <span style="font-size:x-small"><font size="2" style="font-size:x-small"> <p><span style="font-size:x-small"><span style="font-size:x-small">The simple so</span></span>lution would be to join the two tables by ClaimID and if the Claim has multiple ICDDiagnosisCodes then there would be a row for each one. But that is not what the customer wants. The customer wants to see each Claim only once and if there are multiple ICDDiagnosisCodes, then place them in a new column on the same row.</p> </font></span></span> <p><span style="font-size:x-small">I don't know if this helps, but the max number of ICDDiagnosisCodes they can have on a claim is 19.</span></p> <p>Results<br/> ========<br/> ClaimId | ClaimNumber | InjPartySSN | Code1 | Code2| Code3 | Code4 | Code5 | Code6 ...... Code19</p> <p>If anybody can help me, I would truly appreciate it.</p> <p></p>Fri, 27 May 2011 20:20:51 Z2011-06-03T01:33:16Zhttp://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/71c2992d-7934-443c-b03b-490af3025d8fhttp://social.technet.microsoft.com/Forums/en-US/sqldataaccess/thread/71c2992d-7934-443c-b03b-490af3025d8fvcvshttp://social.technet.microsoft.com/profile/vcvs/?type=forumodbc connection re establishes after application pool recycle<div>I have a web service application which connects to databases through odbc sql native client and SQL Server drivers. We have application pool recycling scheduled every day night. But not too often after the scheduled restart, the application stops connecting to database throwing the error 08001 with the message unable to connect to data source. But the problem&nbsp;disappears when I recycle the application pool manually. I dont understand why is is not connecting to the data source. If the issue is with the sql server, how it connects after app pool recycle?&nbsp;<a title="This question shows research effort; it is useful and clear (click again to undo)"></a></div>Sun, 29 May 2011 06:52:31 Z2011-05-29T22:38:10Z