Error Handling And Problem Resolution
Oct 28, 2007
I posted a question a few days ago, to get some general information what this command does:
command.cmd
osql -S (local)SQLEXPRESS -E -i DropDB.sql
DropDB.sql
IF EXISTS (SELECT name FROM sys.databases WHERE name = N'Caching')
DROP DATABASE [Caching]
I have gotten some great answers. Now I like to ask a deeper question. This command was created for SQL Server Express, for an internal software package at my company, by an outside vendor. However, sometimes this command doesn't work 100% on all user computers. So I have two questions.
1. Is there any way to either enhance the command, or the database command, to provide error diagnostics, to find out the issue for an individual user computer, why it doesn't always work?
2. Can anyone think of any scenarios that would prevent this from working?
The key element here is that this caching database is supposed to allow individuals to use a particular piece of software, when they aren't connected to the network at work. But it doesn't always work on each computer - 100% of the time - even when the computer has SQL Server Express installed, and is running Windows XP.
Randy
View 2 Replies
Oct 29, 2007
An outside vendor created this command and SQL files for internal
software, using SQL Server Express, which is installed on every user
machine
osql -S (local)SQLEXPRESS -E -i DropDB.sql
The SQL file has this:
IF EXISTS (SELECT name FROM sys.databases WHERE name = N'Caching')
DROP DATABASE [Caching]
This command was created for SQL Server Express, for an internal software package at my company, by an outside vendor. However, sometimes this command doesn't work 100% on all user computers. So I have two questions.
1. Is there any way to either enhance the command, or the database command, to provide error diagnostics, to find out the issue for an individual user computer, why it doesn't always work?
2. Can anyone think of any scenarios that would prevent this from working?
The key element here is that this caching database is supposed to
allow individuals to use a particular piece of software, when they aren't connected to the network at work. But it doesn't always work on each computer - 100% of the time - even when the computer has SQL Server Express installed, and is running Windows XP.
Randy
View 2 Replies
View Related
Jul 6, 2015
I am using Allwayson to replicate a FCI to a remote site. (windows 2012R2) Although all is implemented, iam getting a strange error with the listener resources after ive made a failover test.
It keeps saying "Name resolution not yet available"from my understanding this is trying to update an entry that doesn't exist (since the user has permissions to do it).
View 4 Replies
View Related
Aug 8, 2007
i created a query and when i run it like this i get data but when i add a value in the 2ed case for '2%' i get error.
Select a.email, case when a.reportnumber like '1%' then (select b.Reportnumber from ijasSummaryNo b where a.Reportnumber = b.Reportnumber) end as Reportnumber, case when a.Reportnumber like '1%' then (select b.stonebreakdown from ijasSummaryNo b where a.Reportnumber = b.Reportnumber) end as Measurement, case when a.Reportnumber like '1%' then (select b.reportcarddate from ijasSummaryNo b where a.Reportnumber = b.Reportnumber) end as ijasDate,
case when a.reportnumber like '2%' then (select c.Reportnumber from appraisalsummaryblue c where a.reportnumber = c.reportnumber) end as imacsRepNo
from t_RegisterInfoTemp a
Query works fine like this but when i add this (the one marked bold i get error)
case when a.reportnumber like '2%' then (select c.Reportnumber from appraisalsummaryblue c where a.reportnumber = c.reportnumber) end as imacsRepNo,case when a.reportnumber like '2%' then (select c.Measurement from appraisalsummaryblue c where a.reportnumber = c.reportnumber) end as Measurement2
This is the error.
Server: Msg 4414, Level 16, State 1, Line 1Could not allocate ancillary table for view or function resolution. The maximum number of tables in a query (260) was exceeded.
View 4 Replies
View Related
Feb 18, 2008
Hello, I want to get data from datatable as below. I am getting error:
BC30516: Overload resolution failed because no accessible 'New' accepts this number of arguments. I did not understand what is wrong. Because everything is same as msdn library.
my codebehind is:
Imports System.Data
Imports System.Data.Sql
Imports System.Data.SqlClientPartial Class Default2 Inherits System.Web.UI.Page
Private Shared Function GetConnectionString() As String
' To avoid storing the connection string in your code,
' you can retrieve it from a configuration file.
Return "Data Source=Database;Initial Catalog=otel;Integrated Security=True;Pooling=False"
End FunctionProtected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.LoadDim connectionString As String = _
GetConnectionString()
' Create a SqlConnection to the database.Using connection As SqlConnection = New SqlConnection(connectionString)
' Create a SqlDataAdapter for the Suppliers table.Dim mailsAdapter As SqlDataAdapter = _ New SqlDataAdapter()
' A table mapping names the DataTable.mailsAdapter.TableMappings.Add("Table", "Pages")
connection.Open()Dim PagesCommand As SqlCommand = New SqlCommand( _"SELECT * FROM Pages", _
connection)
PagesCommand.CommandType = CommandType.Text
' Set the SqlDataAdapter's SelectCommand.
mailsAdapter.SelectCommand = PagesCommand
' Fill the DataSet.
Dim dataSet1 As Dataset = New Dataset("Pages") 'ERROR MESSAGE HERE...........................................mailsAdapter.Fill(dataSet1)
connection.Close()LblPageName.Text = CStr(dataSet1.Tables("Pages").Rows(0).Item(1))
TxtPageTitle.Text = CStr(dataSet1.Tables("Pages").Rows(0).Item(2))TxtPageSummary.Text = CStr(dataSet1.Tables("Pages").Rows(0).Item(3))
Rte1.Text = CStr(dataSet1.Tables("Pages").Rows(0).Item(4))TxtPageimgUrl.Text = CStr(dataSet1.Tables("Pages").Rows(0).Item(5))
End Using
End Sub
End Class
View 1 Replies
View Related
Feb 26, 2008
Hi SQL Server Team,
In order to add a data source by using ODBC Administrator, programmatically i am using SQLConfigDataSource. Thus calling SQLConfigDataSource with the fOption set to either ODBC_ADD_DSN for creating a new DSN.
Following is the stattement specified in the source code. where type_of_driver = "Microsoft Access Driver (*.mdb)"; and parameters contains the data source source credentials information such as DSN, UID, PSW, FIL, Description, DataDirectory,DEFAULTDIR and DBQ all separated by "