Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    MS SQL Server






SuperbHosting.net & Arvixe.com have generously sponsored dedicated servers and web hosting to ensure a reliable and scalable dedicated hosting solution for BigResource.com.







How Do I Start An External Program Using TSQL


Student from norway needs help. After update on certain rows a trigger will trigg a program (using LDAP?) That fetches data and stores it in an Active Directory What should this trigger look like, it only starts another program.

Thanks
Atle Eriksen


View Complete Forum Thread with Replies
Sponsored Links:

Related Messages:
Calling An External Program
Hi,

Is there a stored proc or a function I can call from Query Analyzer to execute another .EXE and return when it's finished?

I'd like something like
SET @RET = sp_CallEXE('c:mypathmyprogram.exe myparameters')

(Except for the name of the function, there should be something that does this right? I mean, DTS does it already so it must be referring to a function or a SP.)

I want an answer to so that I can validate that everything went well (hence the @RET variable)

Thanks,

Skip.

View Replies !   View Related
Xp_cmdshell - Need To Execute External Program Asynchonous
hi,

i need to start an external program (vb.net) from within a trigger. via xp_cmdshell everything works fine except that the execution of the trigger waits for the vb-program to finish.

now i tried a workaround with a "starter application" which only calls the vb.net program (asynchronous) an ends.

this works fine from a dos prompt (command prompt returns immediately and vb.net task is running). but when i call the starter app from the trigger with xp_cmdshell, the behavior is the same as before: execution does not continue until the vb.net task ends.

any other ideas that could solve my problem? submitting an agent-job is not fine for me because i need to supply parameters to the called program and maybe i need call it more than once at the same time.

thanks
thomas

View Replies !   View Related
How Can I Execute An Sql Query Which Is In An External Folder, From My Program??
how can i execute an sql query(which is in test.sql) which is in an external folder, from my program??

View Replies !   View Related
Get Password To Start A Program
I have this Visual Basic program that if you are already logged into the application, the program get the username and password automatically to run the program. If the user runs the program not logged into the application, the program prompts username and password.

I need to know the T-SQL statement that will get the username and password when the user is already logged into the application. Basically I have the username part but the password keeps coming back as NULL and will not allow program to run.

Please help.

Sharon

View Replies !   View Related
Uninstalled Program, Now SQL Won't Start
 

I have recently had issues opening a program.  I called their tech guy and he said that since my SQL is stopped, their program won't open.  He asked if I had uninstalled anything lately.  I had uninstalled the Kodak Easy Share within the last couple of weeks.  We use Windows XP.  I have tried opening the Service Manger and when I click the refresh or start buttons nothing happens. 
 
Please someone help me restart my SQL.
 

View Replies !   View Related
It Takes A Long Time To Insert The First Record Each Time When The Program Start
I am using VS2005 (VB) to develop a PPC WM5.0 Program. And I am using SQLCE 3.0. My PPC Hardware is in 400MHz.

The question is when the program try to insert the first record into sdf database after each time the program started. It takes a long time. Does anyone know why and how can I fix it?

I will load the whole database into a dataset when the program start and do all the "Insert", "Update", "Delete" in this dataset and fill it into database after each action.

        cn.Open()
        sda = New SqlCeDataAdapter(SQL, cn) 'SQL = Select * From Table
        scb = New SqlCeCommandBuilder(sda) 
        sda.Update(dataset)
        cn.Close()

I check the sda.update(), it takes about 0.08s for filling one record into database normally. But:

1. Start the PPC Program

2. Load DB into dataset

3. Create a ONE new record in dataset

4. Fill back to DB

When I take this four steps everytime, the filling time is almost 1s or even more!

Actually, 0.08s is just a normal case. Sometimes, it still takes over 1s to filling back a dataset which only inserted one record when the program is running. (Even all inserted records are exactly the same in data jsut different in the integer key)

 However, when I give up the dataset and using the following code:

            cn.Open()
            Dim cmd As New SqlCeCommand(SQL, cn) ' I have build the insert SQL before (Insert Into Table values(XXXXXXXXXXXXXXX All field)

           cmd.CommandType = CommandType.Text
            cmd.ExecuteNonQuery()
            cn.Close()
            StartTime = Environment.TickCount

 I found that it is still the same that the first inserted record takes more time, but just about 0.2s. And the normal insert time is around 0.02s. It is 4 times faster!!!

View Replies !   View Related
Program Icons In &&"Start Menu&&"
Hello,

I´ve made a mistake on my part. I have deleted my complete program icons for "Microsoft SQL Server" in my start menu.

Is there a simple way to just renew all the icons in my start menu without reinstalling the complete sql server.

Thank you very much for any tips.

View Replies !   View Related
Do Sqlexception Breaks The Functionality Of The Program? (program Flow)
why we use sql exceptions ...

what the program will do if we  caught that exception .. i need some suggestions ... i got this exception(String or binary data would be truncated.
The statement has been terminated.).. will it affect the functionality of the program...

hiow can i avoid this exception..

View Replies !   View Related
Can I Return A Value In A Variable From A SSIS Program Back To C# After The SSIS Program Is Run From C#?
Can I return a value in a variable from a SSIS program back to C# after the SSIS program is run from C#?

View Replies !   View Related
Equivalent Tsql For Sql Server 2000 Is Needed [from Sql Server 2005 Only Tsql]
Can anyone please give me the equivalent tsql for sql server 2000 for the following two queries which works fine in sql server 2005

1
-- Full Table Structure

select t.object_id, t.name as 'tablename', c.name as 'columnname', y.name as 'typename', case y.namewhen 'varchar' then convert(varchar, c.max_length)when 'decimal' then convert(varchar, c.precision) + ', ' + convert(varchar, c.scale)else ''end attrib,y.*from sys.tables t, sys.columns c, sys.types ywhere t.object_id = c.object_idand t.name not in ('sysdiagrams')and c.system_type_id = y.system_type_idand c.system_type_id = y.user_type_idorder by t.name, c.column_id


2
-- PK and Index
select t.name as 'tablename', i.name as 'indexname', c.name as 'columnname' , i.is_unique, i.is_primary_key, ic.is_descending_keyfrom sys.indexes i, sys.tables t, sys.index_columns ic, sys.columns cwhere t.object_id = i.object_idand t.object_id = ic.object_idand t.object_id = c.object_idand i.index_id = ic.index_idand c.column_id = ic.column_idand t.name not in ('sysdiagrams')order by t.name, i.index_id, ic.index_column_id

This sql is extracting some sort of the information about the structure of the sql server database[2005]
I need a sql whihc will return the same result  for sql server 2000

View Replies !   View Related
Error 9004 On Start. SQl Server Fails To Start
Hi

I have a SQL Server 2000 instance that has been running fine for months, but this morning it refuses to start. The event log shows error messages "Error 9004, Severity 21, State 1". I've tried starting SQL Server in minimal server mode, but this doesn't help either.

It looks to me like the master database is corrupt. Can anyone tell me if that's a fair assessment and if there is a quick recovery from this one.

Thanks

Malcolm

BTW: The error log file shows the following...

2004-06-14 10:16:24.49 server Microsoft SQL Server 2000 - 8.00.194 (Intel X86)
Aug 6 2000 00:57:48
Copyright (c) 1988-2000 Microsoft Corporation
Standard Edition on Windows NT 5.0 (Build 2195: Service Pack 3)

2004-06-14 10:16:24.50 server Copyright (C) 1988-2000 Microsoft Corporation.
2004-06-14 10:16:24.50 server All rights reserved.
2004-06-14 10:16:24.50 server Server Process ID is 2384.
2004-06-14 10:16:24.52 server Logging SQL Server messages in file 'e:mssqlMSSQLlogERRORLOG'.
2004-06-14 10:16:24.52 server Warning: -f command line flag used...minimal server configured.
2004-06-14 10:16:24.53 server SQL Server is starting at priority class 'normal'(4 CPUs detected).
2004-06-14 10:16:24.69 server SQL Server configured for fiber mode processing.
2004-06-14 10:16:24.71 server Using dynamic lock allocation. [2500] Lock Blocks, [5000] Lock Owner Blocks.
2004-06-14 10:16:24.80 server MS DTC initialization skipped because of start up option.
2004-06-14 10:16:24.80 spid3 Warning ******************
2004-06-14 10:16:24.82 spid3 SQL Server started in single user mode. Updates allowed to system catalogs.
2004-06-14 10:16:24.83 spid3 Starting up database 'master'.
2004-06-14 10:16:24.85 spid3 Error: 9004, Severity: 21, State: 1.
2004-06-14 10:16:24.86 spid3 06/14/04 10:16:24 Stack Overflow Dump not possible - Exception c00000fd E at 0x00444B1F
2004-06-14 10:16:24.86 spid3 Address=444b1f Exception Code = c00000fd
2004-06-14 10:16:24.88 spid3 eax=00000000 ebx=00000000

View Replies !   View Related
Cant Start SQL Server Using Minimal Start/config
We are trying to start SQL Server using SQLSERVR -f - c but the start up fails with the message error log in use
the error log has hundreds of the following messages :

1999/09/23 09:28:20.72 spid2 Lazywriter: WARNING, LRU list is empty (0 free bufs, 94 total bufs)
1999/09/23 09:29:18.41 spid12 bufwait: timeout, BUF_IO, bp 0x10dc500, pg 0x23e345, stat 0x801000/0x6, obj 0x8,
bpss 0x212e278.

We cannot log on using ISQL just hangs. PS We did not receive recovery complete message on the attempted
minimum startup/

View Replies !   View Related
IS Same? (RS Start In Window Severvices V RS Start In Configration)
 

1) RS Start in Window Severvices
  2) RS Start in Configration

   1) and 2) Is Same?

   I think that It looks like same Operation.

View Replies !   View Related
Get With The Program
It is very interesting to me that most people in this group can't do simpleSQL. Are you viewing MySQL as a simple file system?As long as you do that,you willnot understand SQL in any dialect. So from now on:When you have a question about SQL. post the table structures. Uh, "WithCreate".Post some sample data in the form of INSERTS.Regards,Rich--The journey is the reward.

View Replies !   View Related
Help In Program
i have a program which should give the out like this
XAPIALTMKT20010829105525.TXT

but its giving the output = 'X'
which is just the first initial...how
can i get this...

if i don't write the @filename=....
only then its giving the output..but i want to store it in the
varable..how can i do that
================================
declare
@v datetime ,
@filename varchar

select @v=getdate()
select @filename='XAPIALTMKT'
+CONVERT(varchar, @v, 112)
+SUBSTRING(CONVERT(varchar, @v, 108), 1, 2)
+SUBSTRING(CONVERT(varchar, @v, 108), 4, 2)
+SUBSTRING(CONVERT(varchar, @v, 108), 7, 2)
+'.TXT'

print @filename
================================================

thanks,
Harish

View Replies !   View Related
SQL Program Question
Hello, i installed :

SQL Server 2005 Express Edition with Advanced Services
Install Microsoft SQL Server 2005 Express Edition with Advanced Services

but I do not see any program in my program menu to open it. Is this a stand alone program I can open? Thanks

View Replies !   View Related
Mailsend Program
Hi All,

I have installed SQL Server 2005 and created a job. I made the job failed to test the mailsend program. The notification step that uses the mailsend succeeded but I did not get an email. I am using mailsend program on SQL Server 2000 and it works fine. I am really stomped and don't know what to do to fix it?

Thanks.

View Replies !   View Related
Mailsend Program
Hi All,

I am trying to send an email from a cmd prompt from SQL Server 2005 server using mailsend program. I am getting the message "Could not send mail". I am really stumped, don't know how to fix it. Any suggesstions?

Thanks.

View Replies !   View Related
Triggers - C# Program
Hi,

In SQL Server is it possible to have a trigger that will throw an event which could be caught by C# program running in the back ground?

Is this even possible? If it is, have u any links to help/examples?

Regards!

View Replies !   View Related
Is It This Job Can Program In Trigger?
I've have following table,

tblHIT - this table will reveive record every minutes
Date | Time | Main_ID | Hit
------------------------------------
3/1/2006 | 100 | 200 | 8700
...
...
...
4/14/2008 | 100 | 200 | 4500
4/14/2008 | 100 | 201 | 8700
4/14/2008 | 200 | 200 | 3500
4/14/2008 | 300 | 201 | 7700
...
...

I've also 1 job in SQL Server Agent will execute STORED PROCEDURE and will filter 7 days record before from current date and insert it into tblHIT_7days. tblHIT_7days shown as follow
tblHIT_7days
Date | Time | Main_ID | Hit
------------------------------------
3/7/2008 | 100 | 200 | 8700
...
...
...
4/13/2008 | 100 | 200 | 4500
4/13/2008 | 100 | 201 | 8700
4/13/2008 | 200 | 200 | 3500
4/13/2008 | 300 | 201 | 7700

I've plan to create TRIGGER. This TRIGGER will insert the appropriate record from tblHIT into tblHIT_7days and also delete a appropriate record in tblHIT_7days. This INSERT and DELETE transaction depend on current date.

Is it possible, TRIGGER can do this?

View Replies !   View Related
Using Sql Server In DB Program
I am about to build a program that will require the use of DB.  In the pass I used Access as my back end, but this time I would like to use Sql Server.  I just have a few questions before I begin. 

1. After deploying and installing my program, do I need to have sql server installed on users system or can the DB file exist on its own and just use ADO.NET to access the file? (As I done in the pass to access my Access mdb file)

 2. If I can deploy a sql file -- can it be done with Sql Server Express?

3. If it can't be done, what db program should I use?

View Replies !   View Related
Program Locking Up While Using Rda
On some occasions when trying to send data back to the server, the program will lock up for up to 30 minutes. The code below is the rda data transfer process and the function IsConnected() determines whether there is a connection.
 
  If Not MainFrm.IsConnected Then       
     rda.ConnectionManager = True
  End If
  If MainFrm.IsConnected Then
    Dim sCon As String = "Provider=SQLOLEDB;Data Source=175.21.21.121;Initial       
    Catalog=OurDb;User ID=UserId;Password=pwd"
    rda.InternetUrl = "http://Ourwebsite.co.uk/tfr/sqlcesa30.dll"
    rda.LocalConnectionString = "Data Source=Program FilesSysdata.sdf"
    For i As Integer = 0 To RecCount - 1
      Try
        rda.SubmitSql(UpdateRec(i, 0), sCon)
      Catch Ex As SqlCeException
        ErrTxt = Ex.ToString
      End Try
    Next
 

    Public Shared Function IsConnected() As Boolean
        Dim request As HttpWebRequest
        Dim response As HttpWebResponse
        Try
            request = CType(WebRequest.Create("http://www.intel.com/"), HttpWebRequest)
            response = CType(request.GetResponse(), HttpWebResponse)
            If response.StatusCode = HttpStatusCode.OK Then
                response.Close()
                Return True
            Else
                response.Close()
                Return False
            End If
        Catch Ex As WebException
            Return False
        End Try
    End Function
 
There are rda properties which determine a timeout. How can I use these to stop my program from locking up if the signal is weak?

View Replies !   View Related
Problem With Update Program
 I have written this Program For Updating the profile Information .At the Page_Load Event I read the profile information from the database and write it in the respective Textboxes .At the Button_Click event I have written a program to Update the data from the respective Textboxes.The program executes but doesnot updates .public partial class CreateProfile : System.Web.UI.Page{    SqlConnection con;    SqlCommand com;    string un = HttpContext.Current.User.Identity.Name;    protected void Page_Load(object sender, EventArgs e)    {        con = new SqlConnection("Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Profiledata.mdf;Integrated Security=True;User Instance=True");        com = new SqlCommand("select * from profiletable where username='" + un + "' ", con);        DataSet ds = new DataSet();        SqlDataAdapter da = new SqlDataAdapter(com);        SqlCommandBuilder cb = new SqlCommandBuilder(da);        DataTable dt = new DataTable();        da.Fill(ds);        dt = ds.Tables[0];        Textname.Text = dt.Rows[0][1].ToString();        com.Cancel();    }    protected void Button2_Click(object sender, EventArgs e)    {        con = new SqlConnection("Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Profiledata.mdf;Integrated Security=True;User Instance=True");        con.Open();        com = new SqlCommand("update profiletable set name='" + Textname.Text + "'  where username='" + un + "' ", con);        com.ExecuteNonQuery();        com.Cancel();        con.Close();    }} Plz help me with this program........................   

View Replies !   View Related
Use Sql 2005 To Program Against Sql 2000
I have sql server 2005 (full version) installed on my local machine, while the databases (on the server) I want to program against are in sql 2000. Could I program against sql 2000 databases using sql 2005? If yes, what do I need to know before I start doing that? Any suggestions are welcome.

View Replies !   View Related
ASP.NET,Gettting Error In The Program
Hi,
please have look into the code and let me know the solution plz. 
string ProID;
try
{
using(SqlConnection conn=new SqlConnection(source))
{
conn.Open();
DataSet ds=new DataSet();
DDLProject.Items.Clear();
SqlCommand cmd=new SqlCommand("SP_ProjectSelect",conn);
cmd.CommandType=CommandType.StoredProcedure;
cmd.Parameters.Add("Name",SqlDbType.NChar,30,"@Name");
cmd.UpdatedRowSource=UpdateRowSource.None;
cmd.Parameters["Name"].Value=DDLProductLine.SelectedItem;
 
SqlDataReader dr=cmd.ExecuteReader(); ------------->>>> Here iam getting Following Error.
 
while(dr.Read())
{ Response.Write(dr["ID"].ToString());
}
 
}
}
catch(System.Exception ex)
{
Response.Write(ex);
}
Error:
System.InvalidCastException: Object must implement IConvertible. at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream) at System.Data.SqlClient.SqlCommand.ExecuteReader() at MIS.UI.ResourceList.DDLProductLine_SelectedIndexChanged(Object sender, EventArgs e) in c:inetpubwwwrootdotnet pgmsmisui
esourcelist.aspx.cs:line 121 
Any suggestion plzz,where went wrong.
Thanks in advance
Regards
Mahesh Reddy 
 
 

View Replies !   View Related
Missing Program Group
Guys and GirlsI have a server that was running SQL Server 2000 (on Windows 2000server).In preperation for an upgrade from an old SQL Server 6.5 system. Iun-installed 2000. I edited the registry to remove all references toSQL Server and deleted all files. I have rebooted the server.I have run an install of 6.5. It seems to have worked all right exceptthere is no program groups on my start menu. Any ideas what might havehappened?RegardsMatt

View Replies !   View Related
Store Program EXE In Table?
Hello, Folks. I am not sure if this can be done (and a brief search ofthis group didn't yield any results that I thought would do the trick)but if it can be done it would make my life easier so here goes.First, what I am trying to accomplish is to make a program I've writtenautomatically update itself if there is a newer version on the network.Second, my application runs on one or more computers at manygeographically separated locations. I have remote control softwarethat enables me to remotely update and troubleshoot my application butI since I have to pay for this access per computer I don't have theability to control each and every computer that runs my software (forthose clients with more than one computer that uses my software).Third, my application uses as its data storage system MSDE 2000 (withcurrent service pack).Fourth, my users are not technical people and I want to rely on them aslittle as possible.Fifth, not all of the workstations are Internet enabled or connected,so having the application check a website for an update is notfeasible.Finally, to bring those different pieces together, what I want to beable to do is connect to and control the "server" (the computer withMSDE installed on it) and store in the database what the currentversion number is along with the current program files. Then, when theapplication launches, it will check that stored version number againstit's own version number to determine if there is a newer versionavailable. If there is a newer version available I want it to updateitself (that workstation) by retrieving that newer software from thedatabase. I want to avoid file sharing because it's problematic andsince I already have SQL Server (MSDE) running on the network I'd liketo use that.Is there some way that I can either a) store my program files (one EXEapproximately 5MB in size and one OCX approximately 250KB in size) in atable to be retrieved by my application so it can update itself or b) away to get SQL Server (MSDE) to read a file locally on the server andreturn it to my application just like it would any recordset so I couldjust tell it where the file was and let it read it from whicheverfolder it's stored in?I've looked at making a column of datatype Binary, and perhaps that'sthe way I'll go (re-creating the field to the correct size each time Ido an update or perhaps making it really big so I don't have to worryabout the size). But I thought I'd ask around first since this isn'tanything I know much about.Thank you for your time and help.--HC

View Replies !   View Related
Auto Printing From SQL Using VB6 Program
hiCould someone please help me in following:I have VB 6 program which print reports, manually by pressing Printbutton, base upon Policy Statuses. I want to create a SQL job or anyautomatic process to go through Policy table in SQL2000 and find out allPolicies with ‘Pending Open’ Status and then compare Commencement Date,which stored in Benefit table, and today’s date. If Commencement Date onor before today then change Policy Status to ‘Open’ and then printPolicy Status report by using VB6 but this time report will printautomatic after Policy Status changed to Open.Any solution please*** Sent via Developersdex http://www.developersdex.com ***Don't just participate in USENET...get rewarded for it!

View Replies !   View Related
Creating A Matching Program
Hi,I'm just looking for some general advice on how to approach something.I have two tables A and B, containg common fields of product, salesdate and qtyo.Some records contain the same data and I want to dump them in a newtable called C and leave Tables A and B containg only data thatdoesn'r match.How do i go about approaching this??Regards,Ciarán

View Replies !   View Related
Bulk Copy Program
Hi Techies,

I have a bcp which generates .txt file perfectly. I just wanted to know how can i generate a text file in distributed environment.

Assuming that my Sql Server is running in machine A. I wanted the bcp to generate in Machine B. What are the permission's i should give in order to generate it in Machine B.


Regards
--Tanveer

View Replies !   View Related
AS400 CL Program With SQL Using Dates
I am trying to update a field in a table.

EXCSQLSTM SQLSTM('UPDATE "table1" SET field1 = +
(SELECT COUNT(*) FROM +
"table2" WHERE field2 = +
''XXXXXXX'' AND field3 = +
YEAR(CURDATE())*10000+MONTH(CURDATE())*100++
Day(CURDATE())) WHERE field4 = +
''XXXXXXX''' )

This statement works for dates formatted 20040210, but I need to update another table which uses a date format of 2004-02-10. I have tried to use a variable '&var' but it appears to read it litterally instead of the value it contains.

I would be greatful for any help.

Thanks

View Replies !   View Related
Keyword Search Program
Hi,

I am in the middle of developing procedure for keyword search for our website.

Input parameter is a string consisting keywords in comma delimited format.

This is the example of data I get from business group which I use to populate my key_search table.

product_id keyword
1 Microsoft, training
1CA, DBA
1CA, developer
1CA, network admin
1AZ, DBA
1AK, developer
1MN, DBA
1MN, developer
1OH, developer
2Microsoft, training
2AZ, DBA
2AZ, developer
2IL, developer
2MN, DBA
2CA, developer
2NY, business analyst
2NY, DBA
2NY, developer
2NY, programmer
3Oracle, training
3finance
4Oracle demo
4logistic
4Oracle Financials
4Financial Analyzer

They have provided search string examples like 'Microsoft, DBA, CA'
or 'CA'
or 'Microsoft, developer' or 'training'

I have script ready to remove comma from the string and store words from the input string in a temporary table.
But this is the easiest part.

The Confusing part now for me is to write the optimal code for retrieving the exact match from the key_search table as there is no limit on how many words can be in the string, it can be 1, 2, 3 or more.

Any suggestions on how should I handle this search?

View Replies !   View Related
Problems With SQL Server 2K And VB Program
Hi,
My company has recently migrated our Informix database to SQL server 2K. The data is successfully migrated and the client are able to connect to the database. However, when trying to run a VB application to access the data, it keeps on prompting for SQL server login whenever an sql statement is executed. What could be the problem? We are using SQL server 2k on Windows 2000 and on the client Windows 95. Thanks!

View Replies !   View Related
Rapid Program Design
does anyone know of tools that allow free format screen design, easily programmable data validation and prgramming for use with SQL. I am used to using 4GL languages and want to avoid low level programming. For example to fifind a record and display the details i am used to a line of code that would allow the data field to do the find on to be entered and the next line of code would say find fieldname using index name and the results displayed
please say yes !!!

View Replies !   View Related
Running SQL In A Batch Program
I need to create a program that will run Client Access to download data from the AS400 to a flat file, then run SQL DTS to import the data into a table for use by another software package.

I've created a bat file that does that using the CA RTOPCB command and the SQL DTSRUN utility. Problem is that it appears that I need to first check to see if there is a table in SQL and if there is to delete it. Otherwise, rather than overlay the existing data in the table it adds to it.

Is there a way to issue a SQL drop table in DOS? Or am I missing something that could be done in SQL?

The DTSRUN is using a local package and CA is using a transaction request.

View Replies !   View Related
Php Program Install Error
my database is 4.1. When I attempt to install i get:
'/usr/local/mysql-5.0/data/mysql.sock'
To me this indicates 5.0

I'm stumped!!!!

All help is appreciated.
Thanks

View Replies !   View Related
SQL Hour Scheduling Program?
Does anyone know where to purchase a good (or great) SQL hour scheduler program, and pulls up information from a SQL server and puts this information into a schedule (hourly schedule). I'm looking for something that will show the schedule that people work, the information off the SQL server needed is the "agent" name. If anyone could help me, that would be greatly appreciated.

Thanks.

View Replies !   View Related
How To Run A Vb.net Program From SQL Server 2005?
Hi. First 3 paragraphs are about problem in general - this is for those who consider them well experienced and may have better ideas about how to solve this whole thing. In forth paragraph is the tehnical question.



Hi. First 3 paragraphs are about problem in general - this is for those who consider them well experienced and may have better ideas about how to solve this whole thing. In forth paragraph is the tehnical question.

Situation:
So me was trying to find out why files are saved in database incorrectly. First idea was to create a MD5 checksum of a file in my application and then create one with SQL script that saves data in database (data being the file, by the way).

On software side it worked fine 'cuz i'm developing in Visual Basic .NET 2005 which has a function that return a 32 byte array of hash from a data that you pass to it (like file) - GREAT!

SQL Server 2005 side - not so great. The only function that I have found so far that creates hash is HashBytes that is supposed to do it's job only there's a limintation to data size which means i cant make hash of say 4mb big file.

Problem:
So I figure maybe i could create a vb.net program that return a hash from a data passed to it and call it with SQL script (because hashbytes function doesnt work for me in case you didnt read the first 3 paragraphs)... but I don't know how:(
Any ideas?

View Replies !   View Related
Updateing To SP2 By Program Setup?
Hello,

is there a possibility to run the update setup to Service Pack 2 in backround mode, so the user cannot change any settings?

I want to include the instalation of SQL Server Express SP2 in my InnoSetup, but i can't find the right parameter...

s:=ExpandConstant('{src}DataSqlExpresssqlexpr32.exe');
ShellExec('open',s,'/qn UPGRADE=SQL_Engine INSTANCENAME=SQLEXPRESS"','',sw_ShowNormal,ewWaitUntilTerminated, ECode)


I hope somebody can help

View Replies !   View Related
MASS INSERT FROM VB.NET PROGRAM TO DB
I have the following problem. I need to insert 100.000 records (50Kb each) in one operation from a VB program into a SQL Server 2005 database. All of these records will be ready for inserting at the same time.
How to make this insert as one big transaction instead of 100.000 small ones?

View Replies !   View Related
Creating A Program That Uses A Database.
I am currently writing a program that will use a SQL database. I am use to writing programs that are used to connect over some type of a network, but for this project I need to be able to load the Database and it's tables to the system locally. If anyone has a suggestion it will be greatly appreciated, or any sites for documentation on it. Thank you.

View Replies !   View Related
Statement I = 32; Program Works Regardless Of The Value Of I! Why?
using System;

using System.IO;

using System.Data;

using System.Data.SqlClient;

using System.Configuration;

using System.Web;

using System.Web.Security;

using System.Web.UI;

using System.Web.UI.WebControls;

using System.Web.UI.WebControls.WebParts;

using System.Web.UI.HtmlControls;

public partial class _Default : System.Web.UI.Page

{

DataSet dataSet;

SqlDataAdapter dataAdapter;

DataTable dt;

string connectionString =

"Data Source=LANDON\SQLEXPRESS;Initial Catalog=logbookid;Integrated Security=True";

public void init()

{

try

{

dataSet = new DataSet("logbookDS");

dataAdapter = new SqlDataAdapter("select * from log_bookID order by logbookID", connectionString);

dataAdapter.Fill(dataSet, "log_bookID");

dt = dataSet.Tables["log_bookID"];

GridView1.DataSource = dataSet.Tables["log_bookID"];

}

catch (Exception ex)

{

PrintMessage("exception init:" + ex.Message);

}

}

protected void Page_Load(object sender, EventArgs e)

{

PrintMessage("init()");

init();

if (!IsPostBack)

{

PopulateGrid();

}

}

private void PopulateGrid()

{

// connection string to connect to the Database

//string connectionString =

//"Data Source=LANDON\SQLEXPRESS;Initial Catalog=logbookid;Integrated Security=True";

// Create connection object, initialize with

// connection string and open the connection

System.Data.SqlClient.SqlConnection connection =

new System.Data.SqlClient.SqlConnection(connectionString);



try

{

connection.Open();

// Create a SqlCommand object and assign the connection

System.Data.SqlClient.SqlCommand command =

new System.Data.SqlClient.SqlCommand();

command.Connection = connection;

command.CommandText = "select * from log_bookID order by logbookID";

// create a data adapter and assign the command object

// and add the table mapping for bugs



dataAdapter.SelectCommand = command;

dataAdapter.TableMappings.Add("Table", "log_bookID");

// Create the dataset and use the data adapter to fill it

dataSet = new DataSet();

dataAdapter.Fill(dataSet);

GridView1.DataSource = dataSet.Tables["log_bookID"];



GridView1.DataBind();

}

finally

{

connection.Close();

}

} // end createDataSet

protected void btnAdd_Click(object sender, EventArgs e)

{

string cmd = @"Insert into log_bookID values ('" +

this.txtFdate.Text + "', '" +

this.txtActype.Text + "', '" +

this.txtAcid.Text + "', '" +

System.Convert.ToInt32(this.txtNlandings.Text) + "', '" +

System.Convert.ToDecimal(this.txtNhours.Text) +

"')";

PrintMessage(cmd);

UpdateDB(cmd);

PopulateGrid();

}

private void UpdateDB(string cmd)

{

// connection string to connect to the Database

string connectionString =

"Data Source=LANDON\SQLEXPRESS;Initial Catalog=logbookid;Integrated Security=True";

// Create connection object, initialize with

// connection string and open the connection

System.Data.SqlClient.SqlConnection connection =

new System.Data.SqlClient.SqlConnection(connectionString);

try

{

connection.Open();

// Create a SqlCommand object and assign the connection

System.Data.SqlClient.SqlCommand command =

new System.Data.SqlClient.SqlCommand();

command.Connection = connection;

command.CommandText = cmd;

command.ExecuteNonQuery();

}

finally

{

connection.Close();

}

}

protected int GetSelectedRecord()

{

int logbookID = -1;

int index = GridView1.SelectedIndex;

if (index != -1)

{

DataKey key = GridView1.DataKeys[index];

logbookID = (int)key.Value;

}

return logbookID;

}

protected void btnEdit_Click(object sender, EventArgs e)

{

int logbookID = GetSelectedRecord();

string cmd = @"Update log_bookID set fdate = '" +

this.txtFdate.Text +

"', actype = '" + this.txtActype.Text +

@"' where logbookID = " + logbookID;

UpdateDB(cmd);

PopulateGrid();

}

protected void btnDelete_Click(object sender, EventArgs e)

{

string cmd =

@"delete from log_bookID where logbookID = " + GetSelectedRecord();

try

{

SqlConnection cnObj = new SqlConnection(connectionString);

SqlCommand cmdDelete = new SqlCommand(cmd, cnObj);

dataAdapter.DeleteCommand = cmdDelete;

int i = GetSelectedRecord();

i = 32;

dt.Rows.Delete(); // mystery

dataAdapter.Update(dataSet.Tables["log_bookID"]);

//DataRow[] rowToDelete = dataSet.Tables["log_bookID"].Select(string.Format("logbookID = '{0}'", i));

//rowToDelete[0].Delete();

//try

//{

// dataAdapter.Update(dataSet.Tables["log_bookID"]);

//}

//catch

//{

// Console.WriteLine("Sorry! Error! Canceling request");

//}

PopulateGrid();

}

catch (Exception ex)

{

PrintMessage("exception delete:" + ex.Message);

}

}

protected void GridView_Sorting(Object sender, GridViewSortEventArgs e)

{

// Cancel the sorting operation if the user attempts

// to sort by address.

if (e.SortExpression == "acid")

{

e.Cancel = true;

Message.Text = "You cannot sort by acid.";

SortInformationLabel.Text = "";

}

else

{

Message.Text = "";

}

}

protected void GridView_Sorted(Object sender, EventArgs e)

{

// Display the sort expression and sort direction.

SortInformationLabel.Text = "Sorting by " +

GridView1.SortExpression.ToString() +

" in " + GridView1.SortDirection.ToString() +

" order.";

}

void PrintMessage(string what)

{

StreamWriter swl = new StreamWriter("C:\landon\landon.txt", true);

swl.WriteLine(what);

swl.Flush();

swl.Close();

}



}

View Replies !   View Related
.Net Program Executed In SQL Agent Job
We have a set of three Windows batch jobs, each batch job executes a program or runs ftp.  When the batch jobs are executed in Windows, either command line or through the task scheduler, they run fine.  If I create a SQL agent job that executes each batch file, the job fails. Not only does it fail, but the system log is full of "protected file replacement" messages, mmc's are gone as well as files like hal.dll.  According to the programmer, the program that files is taking data from the SQL server and writing to a text file.  The operating system is Windows 2003 w/sp1 running SQL server 2000 w/sp 3a.  I have repeated this on two seperate servers.  The SQL agent jobs are created by a user with domain admin rights and SQL agent runs under an account with domain admin rights. Has anyone else seen anything like this?

View Replies !   View Related
SSIS And Program Redistributable
 I wrote program which connect to some remote MS SQL Server 2005, create SSIS package and store it to drive. Also it have ability to load SSIS package from drive, connect to server, load the SSIS package to specified server and execute it. Obviously, I used references to SSIS dlls in program. Question is - is SQL2005 necessary to be installed on computer where I execute the program? Since the program works with remote SQL Servers, I think what only some dlls is necessary for the program. Is it so?

View Replies !   View Related

Copyright © 2005-08 www.BigResource.com, All rights reserved