Showing posts with label alli. Show all posts
Showing posts with label alli. Show all posts

Sunday, March 11, 2012

cant delete odbc tracing file..

Hi all
I can not delete the odbc manager tracing file.
Even after disabling tracing (in the odbc manager)
i get a windows massage saing another program is using the odbc tracing
file...
Can i stop the odbc manager service?
What other programs may be using this log?
There is no other runing programm or sql server job.
Please help, this file is growing so fast!
TIA
Rea
Rea,
Refer the below snippet from :
'PRB: ODBC Tracing to SQL.LOG Can Slow SQL Server or Consume All Disk Space'
http://support.microsoft.com/?id=268591
<start quote>
To turn off ODBC Tracing and remove the associated file, follow these steps:
1.. To disable ODBC Tracing:
1.. For Microsoft Windows NT 4.0:
a.. On the Start menu, click on Control Panel, and then click on Data
Sources(ODBC).
b.. Click on the Tracing tab, and choose Stop Tracing Now.
2.. For Microsoft Windows 2000:
a.. On the Start menu, click on Control Panel, click on Administrative
Tools, and then click on Data Sources (ODBC).
b.. Click on the Tracing tab, and choose Stop Tracing Now.
2.. Stop all ODBC applications, and stop SQL Server. In some cases it may
be necessary to reboot the server to free up the file so that it can be
deleted.
3.. Delete the ODBC Tracing file, usually called "C:\SQL.LOG."
4.. Restart SQL Server.
<end quote>
Dinesh
SQL Server MVP
--
SQL Server FAQ at
http://www.tkdinesh.com
"Rea Peleg" <rea_p@.afek.co.il> wrote in message
news:eKbGsGHTEHA.1472@.TK2MSFTNGP09.phx.gbl...
> Hi all
> I can not delete the odbc manager tracing file.
> Even after disabling tracing (in the odbc manager)
> i get a windows massage saing another program is using the odbc tracing
> file...
> Can i stop the odbc manager service?
> What other programs may be using this log?
> There is no other runing programm or sql server job.
> Please help, this file is growing so fast!
> TIA
> Rea
>
|||Thanks alot !
"Dinesh T.K" <tkdinesh@.nospam.mail.tkdinesh.com> wrote in message
news:uaDVzOHTEHA.1732@.TK2MSFTNGP09.phx.gbl...
> Rea,
> Refer the below snippet from :
> 'PRB: ODBC Tracing to SQL.LOG Can Slow SQL Server or Consume All Disk
Space'
> http://support.microsoft.com/?id=268591
> <start quote>
> To turn off ODBC Tracing and remove the associated file, follow these
steps:
> 1.. To disable ODBC Tracing:
> 1.. For Microsoft Windows NT 4.0:
> a.. On the Start menu, click on Control Panel, and then click on
Data
> Sources(ODBC).
> b.. Click on the Tracing tab, and choose Stop Tracing Now.
> 2.. For Microsoft Windows 2000:
> a.. On the Start menu, click on Control Panel, click on
Administrative
> Tools, and then click on Data Sources (ODBC).
> b.. Click on the Tracing tab, and choose Stop Tracing Now.
> 2.. Stop all ODBC applications, and stop SQL Server. In some cases it
may
> be necessary to reboot the server to free up the file so that it can be
> deleted.
> 3.. Delete the ODBC Tracing file, usually called "C:\SQL.LOG."
> 4.. Restart SQL Server.
> <end quote>
> --
> Dinesh
> SQL Server MVP
> --
> --
> SQL Server FAQ at
> http://www.tkdinesh.com
> "Rea Peleg" <rea_p@.afek.co.il> wrote in message
> news:eKbGsGHTEHA.1472@.TK2MSFTNGP09.phx.gbl...
>

cant delete odbc tracing file..

Hi all
I can not delete the odbc manager tracing file.
Even after disabling tracing (in the odbc manager)
i get a windows massage saing another program is using the odbc tracing
file...
Can i stop the odbc manager service'
What other programs may be using this log?
There is no other runing programm or sql server job.
Please help, this file is growing so fast!
TIA
ReaRea,
Refer the below snippet from :
'PRB: ODBC Tracing to SQL.LOG Can Slow SQL Server or Consume All Disk Space'
http://support.microsoft.com/?id=268591
<start quote>
To turn off ODBC Tracing and remove the associated file, follow these steps:
1.. To disable ODBC Tracing:
1.. For Microsoft Windows NT 4.0:
a.. On the Start menu, click on Control Panel, and then click on Data
Sources(ODBC).
b.. Click on the Tracing tab, and choose Stop Tracing Now.
2.. For Microsoft Windows 2000:
a.. On the Start menu, click on Control Panel, click on Administrative
Tools, and then click on Data Sources (ODBC).
b.. Click on the Tracing tab, and choose Stop Tracing Now.
2.. Stop all ODBC applications, and stop SQL Server. In some cases it may
be necessary to reboot the server to free up the file so that it can be
deleted.
3.. Delete the ODBC Tracing file, usually called "C:\SQL.LOG."
4.. Restart SQL Server.
<end quote>
Dinesh
SQL Server MVP
--
--
SQL Server FAQ at
http://www.tkdinesh.com
"Rea Peleg" <rea_p@.afek.co.il> wrote in message
news:eKbGsGHTEHA.1472@.TK2MSFTNGP09.phx.gbl...
> Hi all
> I can not delete the odbc manager tracing file.
> Even after disabling tracing (in the odbc manager)
> i get a windows massage saing another program is using the odbc tracing
> file...
> Can i stop the odbc manager service'
> What other programs may be using this log?
> There is no other runing programm or sql server job.
> Please help, this file is growing so fast!
> TIA
> Rea
>|||Thanks alot !
"Dinesh T.K" <tkdinesh@.nospam.mail.tkdinesh.com> wrote in message
news:uaDVzOHTEHA.1732@.TK2MSFTNGP09.phx.gbl...
> Rea,
> Refer the below snippet from :
> 'PRB: ODBC Tracing to SQL.LOG Can Slow SQL Server or Consume All Disk
Space'
> http://support.microsoft.com/?id=268591
> <start quote>
> To turn off ODBC Tracing and remove the associated file, follow these
steps:
> 1.. To disable ODBC Tracing:
> 1.. For Microsoft Windows NT 4.0:
> a.. On the Start menu, click on Control Panel, and then click on
Data
> Sources(ODBC).
> b.. Click on the Tracing tab, and choose Stop Tracing Now.
> 2.. For Microsoft Windows 2000:
> a.. On the Start menu, click on Control Panel, click on
Administrative
> Tools, and then click on Data Sources (ODBC).
> b.. Click on the Tracing tab, and choose Stop Tracing Now.
> 2.. Stop all ODBC applications, and stop SQL Server. In some cases it
may
> be necessary to reboot the server to free up the file so that it can be
> deleted.
> 3.. Delete the ODBC Tracing file, usually called "C:\SQL.LOG."
> 4.. Restart SQL Server.
> <end quote>
> --
> Dinesh
> SQL Server MVP
> --
> --
> SQL Server FAQ at
> http://www.tkdinesh.com
> "Rea Peleg" <rea_p@.afek.co.il> wrote in message
> news:eKbGsGHTEHA.1472@.TK2MSFTNGP09.phx.gbl...
>

Saturday, February 25, 2012

Cant convert record to integer

Hi All

I'm getting an error that says that this can't be converted to an integer.

Here is the line that gets the error.dt = ((DataView)(EventDataSource1.Select(dssa))).ToTable()

I have also tried. dt = (DataView)(EventDataSource1.Select(dssa);

I am programming in VB

here is teh rest of my code.

Dim EventDataSource1 As New SqlDataSource()

EventDataSource1.ConnectionString = ConfigurationManager.ConnectionStrings("ASPNETDBConnectionString").ToString

Dim dssa As New DataSourceSelectArguments()

Dim EventID As String = ""

Dim DataView = ""

Dim dt As New Data.DataTable

Dim conn As New Data.SqlClient.SqlConnection(ConfigurationManager.ConnectionStrings("ASPNETDBConnectionString").ToString())

Dim cmd As New Data.SqlClient.SqlCommand("SELECT EventID FROM Event WHERE ([StartDate] = @.StartDate)", conn)

EventDataSource1.SelectCommand = ("SELECT EventID FROM Event WHERE ([StartDate] = @.StartDate)")

conn.Open()

dt = ((DataView)(EventDataSource1.Select(dssa))).ToTable()

EventID = dt.Rows(0)(0).ToString()

EventDataSource1.SelectParameters.Add("@.StartDate",StartDate)

EventID = cmd.ExecuteScalar()

Seems like you overdoing it. If all you want is the first row, first column value...try something like this.

Dim EventIDAs String =""Dim connAs New Data.SqlClient.SqlConnection("Connection String")Dim cmdAs New Data.SqlClient.SqlCommand("SELECT EventID FROM Event WHERE ([StartDate] = @.StartDate)", conn)'add parameters cmd.Parameters.Add(New SqlClient.SqlParameter("@.StartDate","01/01/2007"))'open connections cmd.Connection.Open()'get top row and column EventID = cmd.ExecuteScalar()'close connection cmd.Connection.Close()'clean up conn =Nothing cmd =Nothing

|||

That's all? Wow thanks!!

Just out of interest, what would I change if I didn't want the first column?

Thanks

|||here is a sample,
Dim EventIDAs String Dim drAs SqlDataReaderDim connAs New Data.SqlClient.SqlConnection("Connection String")Dim cmdAs New Data.SqlClient.SqlCommand("SELECT EventID FROM Event WHERE ([StartDate] = @.StartDate)", conn)'add parameters cmd.Parameters.Add(New SqlClient.SqlParameter("@.StartDate","01/01/2007"))'open connections cmd.Connection.Open()'get entire dataset dr = cmd.ExecuteReaderWhile dr.Read()If IsDBNull(dr.Item("EventID")) =False Then EventID = (dr.Item("EventID"))End If'do whatever you want witht the dataEnd While'close dr dr.Close()'close connection cmd.Connection.Close()'clean up conn =Nothing cmd =Nothing
just remember to close the reader.|||Thanks again. Everything works great! YEEE HAAA!!!!Yes

Tuesday, February 14, 2012

cant connect to my databse in lan

Hi all!

I am using MSSQL 2005 and asp.net .I have made a web application that needs to be run in LAN.The authentication used is windows authentication.The problem is that when in LAN I cannot connect to the database The sqlexception error shows that the connection is closed.Is there any thing that i am missing?Any configurations i need to make??Is this the issue of remote connections?? Please help!!I am new and dont knw much abt it .Thanks!!

Quote:

Originally Posted by dotnetgal

Hi all!

I am using MSSQL 2005 and asp.net .I have made a web application that needs to be run in LAN.The authentication used is windows authentication.The problem is that when in LAN I cannot connect to the database The sqlexception error shows that the connection is closed.Is there any thing that i am missing?Any configurations i need to make??Is this the issue of remote connections?? Please help!!I am new and dont knw much abt it .Thanks!!


yes you have to setup the Security of SQL Server to accept Mix Authentication|||

Quote:

Originally Posted by ck9663

yes you have to setup the Security of SQL Server to accept Mix Authentication


hello !!

Thanks for the reply.But how am i to set it up to accept Mix Authentication?|||

Quote:

Originally Posted by dotnetgal

hello !!

Thanks for the reply.But how am i to set it up to accept Mix Authentication?


open enterprise manager. right click on your server. choose properties. a dialog box will appear. choose Securtiy. on Server Authentication, choose SQL Server and Windows authentication mode|||

Quote:

Originally Posted by ck9663

open enterprise manager. right click on your server. choose properties. a dialog box will appear. choose Securtiy. on Server Authentication, choose SQL Server and Windows authentication mode


thanks!!I did it but dtill the problem persists!!Any idea?