Hello,
maybe you are interested in this.
I wrote a java applet on www.sqlinform.com which is a SQL Code beautifier / formatter. It is for all kind of SQL (DB2, ORACLE; Access, Informix, etc). The only thing you need is a Java Runtime Environment (which should be available in most cases). You can beautify SQL statements out of program code and format them for Java, ASP, VB, PHP.
Regards
GuidoMarcel
Hello, maybe you are interested in this. I wrote a java applet on www.sqlinform.com which is a SQL Code beautifier / formatter. It is for all kind of SQL (DB2, ORACLE; Access, Informix, etc). The only thing you need is a Java Runtime Environment (which should be available in most cases). You can beautify SQL statements out of program code and format them for Java, ASP, VB, PHP. Regards GuidoMarcel
Hello, I am 13 years old and trying to create a mmorpg(massively multiplayer online role playing game) and need a database so people can register, buy weapons, kill other people, etc. The only problem is, I only know javascript and html. I was wondring if anyone had free code for MS Server 2000 that users of my game register, and it records the users username, password, etc. Thanks so much,
Does anyone know of an sql beautifier? Meaning, a little app that will take out garbage tabs and spaces and put select, from, where, etc. on separate lines.
I've checked out tidy.sourceforge.net and sql beautifier, the latter lacking a version for Windows 2000 that works (I've emailed the support email address and haven't heard anything back yet).
I have created a stored procedure which should accepts a search friendly string to be used in a free text search. I am using DSPerson AS FT_TBL INNER JOIN CONTAINSTABLE (DSPerson, [FiftyWords], @FiftyWords ,50 ) AS KEY_TBL ON FT_TBL.PersonID = KEY_TBL.[KEY] WHERE FT_TBL.PersonID != @PersonID ORDER BY KEY_TBL.RANK DESC Now the problem here is that the parameter @FiftyWords should be able to accept a string such as '"Love" OR "Hate" OR "Customer Service"' Notice the start and end of the query with single quotes and concepts should be between double quotes. Now this works OK inside SQL Query Analyzer, but try to get this right building such a string within ASP.NET and passing it as a parameter to SQL. In SQL profiler it comes out all weird with more quotes than originally built on asp side (errror obviously). Furthermore, I can't find an escape sequence that comes out right on the SQL side. Any ideas of how to fix this??
Hi all--I'm trying to convert a function which I inherited from a SQL Server 2000 DTS package to something usable in an SSIS package in SQL Server 2005. Given the original code here: Function Main() on error resume next dim cn, i, rs, sSQL Set cn = CreateObject("ADODB.Connection") cn.Open "Provider=sqloledb;Server=<server_name>;Database=<db_name>;User ID=<sysadmin_user>;Password=<password>" set rs = CreateObject("ADODB.Recordset") set rs = DTSGlobalVariables("SQLstring").value
for i = 1 to rs.RecordCount sSQL = rs.Fields(0).value cn.Execute sSQL, , 128 'adExecuteNoRecords option for faster execution rs.MoveNext Next
Main = DTSTaskExecResult_Success
End Function
This code was originally programmed in the SQL Server ActiveX Task type in a DTS package designed to take an open-ended number of SQL statements generated by another task as input, then execute each SQL statement sequentially. Upon this code's success, move on to the next step. (Of course, there was no additional documentation with this code. :-)
Based on other postings, I attempted to push this code into a Visual Studio BI 2005 Script Task with the following change:
public Sub Main()
...
Dts.TaskResult = Dts.Results.Success
End Class
I get the following error when I attempt to compile this:
Error 30209: Option Strict On requires all variable declarations to have an 'As' clause.
I am new to Visual Basic, so I'm on a learning curve here. From what I know of this script: - The variables here violate the new Option Strict On requirement in VS 2005 to declare what type of object your variable is supposed to use.
- I need to explicitly declare each object, unless I turn off the Option Strict On (which didn't seem recommended, based on what I read).
Given this statement:
dim cn, i, rs, sSQL
I'm looking at "i" as type Integer; rs and sSQL are open-ended arrays, but can't quite figure out how to read the code here:
This code seems to create an instance of a COM component, then pass provider information and create the recordset being passed in by the previous task, but am not sure whether this syntax is correct for VS 2005 or what data type declaration to make here. Any ideas/help on how to rewrite this code would be greatly appreciated!
I'm working towards MCAD and as elective I want to do the SQL Server course. The exam is on SQL Server 2000. I was just wondering whether the online course that Microsoft currently have a available for free at https://www.microsoftelearning.com/sqlserver2005/default.aspx would be useful and applicable to SQL Server 2000, or whether it is sufficiently different product to make it confusing to use this as a learning resource. Also if anyone can point me toward any webcasts for SQL Server that would be great. I listened to Fritz Onion's 15 part series when I studied for my ASP.NET exam and would like to do something similar for SQL Server 2000 if any are available.
In SQL 2005, sys.databases has a column named recovery_model that stores a code for the type of recovery model used by the database. Where is the recovery_model column in the SQL 2000 master database?
Does anyone know where to find a simple sample showing you how to use asp.net 2.0 with the login control to direct you to another aspx page using SQL 2000 as the database on a hosted server? I have been beating my head against the wall trying to figure this out and would be very appreciative if anyone knows a place out there that shows this? I can find many sites that show you how to do this with SQL 2005, but not SQL 2000. Thanks - Chris
during install of SRS 2000 in a dev environment I get the following error:
Error Code 6
Installing Performance Monitor Objects failed.
If I choose ignore, the wizard freezes and no further activity is performed regardless of how long I leave it.
Also, during the install it does not automatically detect the SQL server name when nominating the server, you have to type this in manually even after refreshing the list.
The SQL server was installed using the default instance.
Being installed on 2000 Server with latest service pack, and with SQL 2000 on sp4.
Hi all, Please help me for the code of connectivity it was working fine,but,when i hav written code for validation for id n password,its showing error as Violation of PRIMARY KEY constraint 'PK_Login'. Cannot insert duplicate key in object 'login_detail'. The statement has been terminated. Here is my code given below. Please help me Imports System Imports System.IO Imports System.Xml Imports System.Text Imports System.Security.Cryptography Imports System.Web.UI.WebControls Imports System.Web.UI.HtmlControls Imports System.Data Imports System.Data.SqlClientPublic Class WebForm1 Inherits System.Web.UI.Page#Region " Web Form Designer Generated Code " 'This call is required by the Web Form Designer.<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() End SubProtected WithEvents txtUser As System.Web.UI.WebControls.TextBox Protected WithEvents txtPwd As System.Web.UI.WebControls.TextBoxProtected WithEvents btnSubmit As System.Web.UI.WebControls.Button Protected WithEvents lblError As System.Web.UI.WebControls.Label 'NOTE: The following placeholder declaration is required by the Web Form Designer. 'Do not delete or move it.Private designerPlaceholderDeclaration As System.Object Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init 'CODEGEN: This method call is required by the Web Form Designer 'Do not modify it using the code editor. InitializeComponent() End Sub #End RegionPrivate Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'Put user code to initialize the page here Dim objConn As SqlClient.SqlConnection Dim ds As New DataSetDim m_strConnection As String = "server=172.16.152.17;Database=Trial;UID=abhi_Asset4;PWD=L!nux001;Connect Timeout=100"objConn = New SqlClient.SqlConnection objConn.ConnectionString = m_strConnection objConn.Open() Dim strSQL As String strSQL = "insert into login_detail(UserID,Password) values('" + txtUser.Text + "','" + txtPwd.Text + "')"Dim objCommand As SqlClient.SqlCommandobjCommand = New SqlClient.SqlCommand(strSQL, objConn) objCommand.CommandText = strSQL objCommand.ExecuteNonQuery() objConn.Close()
End SubPrivate Sub btnSubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSubmit.Click If (txtUser.Text.Trim() = "") Then lblError.Text = "UserID should not be blank" ElseIf (Convert.ToInt32(txtUser.Text.Length) < 5) Then lblError.Text = "UserID length must be more than 5" ElseIf (Convert.ToInt32(txtUser.Text.Length) > 20) Then lblError.Text = "UserID length must not be greater than 20" ElseIf (txtPwd.Text.Trim() = "") Then lblError.Text = "Password should not be blank" ElseIf (Convert.ToInt32(txtPwd.Text.Length) < 5) Then lblError.Text = "Password length must be more than 5" ElseIf (Convert.ToInt32(txtPwd.Text.Length) > 20) Then lblError.Text = "Password length must not be greater than 20" Else Server.Transfer("Success.aspx") End IfEnd Sub End Class
help,a regular text file how to sql 2000 table code ?i have a text file as follow, line with ¡°|¡±and {LF},8|-000000186075919.|+000000000387820.|2008-03-31|20010423|9|-000000000003919.|-000000000123620.|2008-03-31|20010123|8|-000000018623419.|+000000000381230.|2008-05-30|20010423|i want to sign char(1)£¬year decimal(18,3) , month decimal(18,3), trandatesmalldatetime£¬update smalldatetime£¬after to sql table is as follow,sign year month trandate update8 -186075919.000 387820.000 3/31/2008 4/23/20019 -3919.000 -123620.000 3/31/2008 1/1/20018 -18623419.000 387820.000 5/30/2008 4/23/2001could you help me how write the sql code ?
I have a SP that works on SQL 2000 but not on 2005
It is just suppose to step through my code and insert values into tables where it finds the "ticked" values
here is apiece of my code. I hope it Helps.
Code Snippet INSERT INTO Members (ClientID, Name, Surname, Email, Username, Password, Active, WlcSent) SELECT ClientID, [Name], Surname, Email, Username, Password, Active, [Welcome Sent] FROM StageMemberUploading WHERE ID = @numValues
SET @CurrentValue = (SELECT SCOPE_IDENTITY()) IF @ClientID IS NOT NULL BEGIN INSERT INTO MemberUsergroup (MemberID, ClientID, UsergroupID) VALUES (@CurrentValue, @ClientID, @UsergroupID) END IF @DateOfBirth IS NOT NULL BEGIN INSERT INTO _MemberProfileCharacterValues (MemberID, OptionID, OptionValue) VALUES (@CurrentValue, 1, @DateOfBirth) END -------------------My Code Stops here ------------------------------ IF @Male = 'x' BEGIN INSERT INTO _MemberProfileLookupValues (MemberID, OptionID, ValueID) VALUES (@CurrentValue, 2, 1) END IF @Female = 'x' BEGIN INSERT INTO _MemberProfileLookupValues (MemberID, OptionID, ValueID) VALUES (@CurrentValue, 2, 3) END
How to upload excel data to sql server 2000 thorugh .net application. I want like one upload button should be there,we have to browese corresponding excel file and then we need to upload to database. before uploading it has to ask appending or replace everything in table. both options appending and replacing shoulb be there. How to upload ? any sample code is there plz give me.
Karikalan writes "We need alpha numeric auto increment code in sql server 2000. (for eg.: ico1001, ico1002, ico1003,......) Can any one send the code in MS sql server 2000? plz .................. bcoz i am beginner in sqlserver 2000"
My web project (ASP.NET 2.0 / C#) runs against sql server 2000 and uses the System.Data.SqlClient.using System.Data.SqlClient; I use System.Data.SqlClient.SqlConnection and System.Data.SqlClient.SqlCommand to make the connections to the database and do selects and updates. Is it correct to continue to use these against SQL Server 2005? I ask because I made a connection string (outside of .Net) for SqlServer 2005 using the SQL native provider and it had the following - Provider=SQLNCLI.1 and any connection strings I had made (also outside of ASP.NET) fro SQL Server all used Provider=SQLOLEDB.1. This is why I wondered if there is a different SqlClient in .Net 2.0 for SQL Server 2005? Cheers Al
I am applying hourly differential backup to the backup server from production with the following command. This command makes the database on standby server into read only mode.
RESTORE DATABASE ARSYSTEM FROM DISK = 'E:SQL backup from productionsql_full_backup' WITH MOVE 'arsystem' TO 'd:ardataarsystem.mdf' , MOVE 'arsystem_log' TO 'D:ARLOGARsystem' , STANDBY = 'E:SQL backup from productionSQL daily diff back up'
Now I want to run a command which will put the database in write mode. I have created a job which would make the datbase Write mode. This job runs successfully sometimes and fails sometimes. I need to ensure that the job always succeeds. When it fails, how do I troubleshoot and what is the possible fix?
Thanks in advance.
The error message is
Cannot apply the backup on device 'E:SQL backup from productionSQL daily diff back up' to database 'ARSYSTEM'. [SQLSTATE 42000] (Error 3136) RESTORE DATABASE is terminating abnormally. [SQLSTATE 42000] (Error 3013). The step failed.
The steps for the job are as follows with the failing step highlighted in bold.
copy /y "\172.31.9.12Remedy BackupackupSQL backupsql_full_backup" "E:SQL backup from productionsql_full_backup"
copy /y "\172.31.9.12Remedy BackupackupSQL backupSQL daily diff back up" "E:SQL backup from productionSQL daily diff back up"
xp_cmdshell 'net stop "bmc remedy action request system server"'
exec rp_kill_db_processes 'ARSYSTEM'
RESTORE DATABASE ARSYSTEM
FROM DISK = 'E:SQL backup from productionsql_full_backup'
WITH
MOVE 'arsystem' TO 'd:ardataarsystem.mdf' ,
MOVE 'arsystem_log' TO 'D:ARLOGARsystem' ,
NORECOVERY
Failing step
RESTORE DATABASE ARSYSTEM
FROM DISK = 'E:SQL backup from productionSQL daily diff back up'
WITH
MOVE 'arsystem' TO 'd:ardataarsystem.mdf' ,
MOVE 'arsystem_log' TO 'D:ARLOGARsystem' ,
RECOVERY
xp_cmdshell 'del /f "E:SQL backup from productionsql_full_backup"'
xp_cmdshell 'del /f "E:SQL backup from productionsql daily diff back up"'
xp_cmdshell 'net start "bmc remedy action request system server"'
I have scheduled the following hourly diffential restore job too which never fails.
RESTORE DATABASE ARSYSTEM FROM DISK = 'E:SQL backup from productionsql_full_backup' WITH MOVE 'arsystem' TO 'd:ardataarsystem.mdf' , MOVE 'arsystem_log' TO 'D:ARLOGARsystem' , STANDBY = 'E:SQL backup from productionSQL daily diff back up' EXEC MASTER..XP_CMDSHELL 'del /f "E:SQL backup from productionSQL daily diff back up"'
hi - I am developing locally using .Net 2.0/Access but just recently started trying out SQL Server Express. I have deployed my application to a host who provides 2.0 but as would be expected only MSDE/SQL server 2000. Now if I'd switch completely to SSE, would my SQL queries (which are pretty simple) work on MSDE or SQL server 2000? The only thing I see as more sophisticated sql queries would be the built-in 2.0 Roles/Membership functions... Do you think they would run smoothly on MSDE/SQL 2000?Finally... since the database is already done locally, is there any way (a stored procedure for example) to copy it's scheme if I'd create a new DB on my host's SQL server?
Table 1: AddressBook Fields --> User Name, Address, CountryCode
Table 2: Country Fields --> Country Code, Country Name
Step 1 : I have created a Cube with these two tables using SSAS.
Step 2 : I have created a report in SSRS showing Address list.
The Column in the report are User Name, Address, Country Name
But I have no idea, how to convert this Country Code to Country name.
I am generating the report using the Layout tab. ( Data | Layout | Preview ) Report1.rdl [Design]
Anyone help me to solve this issue. Because, in our project most of the transaction tables have Code and Code description in master table. I need to convert all code into corresponding description in all my reports.
I would like to make sure that SQL Server Express is completely free even for public institutions e.g. bailiff office. We (my office) want to use SQL Server Express 2005 at 9 computers for free, is it possible? Can you give me a full answer? Thanks!
Surely not everyone that uses SQL on a shared server has to buy their own copy of SQL Server?
Is there a free utility to copy it from the host to local? I am assuming that SQL management express can not do this (after searching the help for a while... annoying)
Hello, I'm using ASP.Net to update a table which include a lot of fields may be around 30 fields, I used stored procedure to update these fields. Unfortunatily I had to use a FormView to handle some TextBoxes and RadioButtonLists which are about 30 web controls. I 've built and tested my stored procedure, and it worked successfully thru the SQL Builder.The problem I faced that I have to define the variable in the stored procedure and define it again the code behind againALTER PROCEDURE dbo.UpdateItems ( @eName nvarchar, @ePRN nvarchar, @cID nvarchar, @eCC nvarchar,@sDate nvarchar,@eLOC nvarchar, @eTEL nvarchar, @ePhone nvarchar, @eMobile nvarchar, @q1 bit, @inMDDmn nvarchar, @inMDDyr nvarchar, @inMDDRetIns nvarchar, @outMDDmn nvarchar, @outMDDyr nvarchar, @outMDDRetIns nvarchar, @insNo nvarchar,@q2 bit, @qper2 nvarchar, @qplc2 nvarchar, @q3 bit, @qper3 nvarchar, @qplc3 nvarchar, @q4 bit, @qper4 nvarchar, @pic1 nvarchar, @pic2 nvarchar, @pic3 nvarchar, @esigdt nvarchar, @CCHName nvarchar, @CCHTitle nvarchar, @CCHsigdt nvarchar, @username nvarchar, @levent nvarchar, @eventdate nvarchar, @eventtime nvarchar ) AS UPDATE iTrnsSET eName = @eName, cID = @cID, eCC = @eCC, sDate = @sDate, eLOC = @eLOC, eTel = @eTEL, ePhone = @ePhone, eMobile = @eMobile, q1 = @q1, inMDDmn = @inMDDmn, inMDDyr = @inMDDyr, inMDDRetIns = @inMDDRetIns, outMDDmn = @outMDDmn, outMDDyr = @outMDDyr, outMDDRetIns = @outMDDRetIns, insNo = @insNo, q2 = @q2, qper2 = @qper2, qplc2 = @qplc2, q3 = @q3, qper3 = @qper3, qplc3 = @qplc3, q4 = @q4, qper4 = @qper4, pic1 = @pic1, pic2 = @pic2, pic3 = @pic3, esigdt = @esigdt, CCHName = @CCHName, CCHTitle = @CCHTitle, CCHsigdt = @CCHsigdt, username = @username, levent = @levent, eventdate = @eventdate, eventtime = @eventtime WHERE (ePRN = @ePRN) and the code behind which i have to write will be something like thiscmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@eName", ((TextBox)FormView1.FindControl("TextBox1")).Text);cmd.Parameters.AddWithValue("@ePRN", ((TextBox)FormView1.FindControl("TextBox2")).Text); cmd.Parameters.AddWithValue("@cID", ((TextBox)FormView1.FindControl("TextBox3")).Text);cmd.Parameters.AddWithValue("@eCC", ((TextBox)FormView1.FindControl("TextBox4")).Text); ((TextBox)FormView1.FindControl("TextBox7")).Text = ((TextBox)FormView1.FindControl("TextBox7")).Text + ((TextBox)FormView1.FindControl("TextBox6")).Text + ((TextBox)FormView1.FindControl("TextBox5")).Text;cmd.Parameters.AddWithValue("@sDate", ((TextBox)FormView1.FindControl("TextBox7")).Text); cmd.Parameters.AddWithValue("@eLOC", ((TextBox)FormView1.FindControl("TextBox8")).Text);cmd.Parameters.AddWithValue("@eTel", ((TextBox)FormView1.FindControl("TextBox9")).Text); cmd.Parameters.AddWithValue("@ePhone", ((TextBox)FormView1.FindControl("TextBox10")).Text); cmd.Parameters.AddWithValue("@eMobile", ((TextBox)FormView1.FindControl("TextBox11")).Text); So is there any way to do it better than this way ?? Thank you
I'm executing a stored procedure, before execution the memory used for sqlservr.exe in the task manager reflects about 50mb. but after the stored procedure is executed, the memory used by sqlservr.exe boosts up to 200mb and remains at 200mb even after execution. this causes my pc to slow down. how dow i reset the memory used by sqlservr.exe after executing the stored procedure? any help will be very much appreciated. thank you.
I'm not sure where to post this question but this place seams to fitt best.
I'm wondering about intellisense's that are free ang good for sql 2005 and 2008. I tried to google it and I tried to search for it in here but didnt find something good. I only find products that aint free and atm that aint an option actually.
So do any of you know some free goog intellisense for sql 2005 and/or 2008?