Refresh A Windows Form Without Closing It

Jul 4, 2007

Hi all

I have a couple of windows forms which share tables or parts of tables.

When I edit a tables data on one form (form2), where it ,s data is linked to another form ( form1), when I go back to form1 I find that the fields have not been updated until I close the form and reopen it.

Is there a way to refresh the field on form1 by using a button in the menu bar and what would the code behind look like. I use vb .



Thanks

Rob

View 10 Replies


ADVERTISEMENT

Reporting Services Groups Closing On Refresh

Jan 16, 2008

I have groups in a Reporting Services report just fine, but when there is a refresh, they close...

I want the groups to stay opened when there is a refresh.

Please help.

View 1 Replies View Related

Remote Access For Windows Form Application

Jan 10, 2007

I have a windows based software application that connects remotely to a sql server 2005 and calls stored procedures. There is someone that I work with that is cautioning the company strongly that this is a bad thing to do in terms of security. Isn't this a very common thing to do? Assuming that the SQL Server installation is setup appropriately. Is this a bad practice?

View 4 Replies View Related

How To Deploy SQL Server Everywhere With My Windows Form Application?

Jul 25, 2006

Hello!

I've been creating a vb.net 2005 windows form application using Everywhere and it has been going pretty well. However, I haven't had much luck finding any help on how to deploy my Everywhere database file(s) and Everywhere itself. To install redistribute Everywhere, can I just add the the 8 .dlls found in the Everywhere directory into my VS setup project? Also, what database file(s) do I need to deploy in my windows setup?

Thanks!

View 4 Replies View Related

Get Windows Logged In Username In SQL When Using Win Auth Mode In SQL Form ASP

Jun 18, 2007

Hi Guys,
I have an Intranet web application and I have to use windows authentication. They are 4 main users group to access the application, each with different set of permission on my store procedures.
I have created a windows group for each of those group in my windows environemnt. My DB Connection String in web.config is set to Integrated Windows Authentication ( Integrated Security=SSPI)
I have done all configuration based on this article: http://msdn2.microsoft.com/en-us/library/ms998292.aspx
I have 4 different database Roles in my database and 4 different database users. I also add NT AUTHORITYNETWORK SERVICE as a member of each of those database Roles.
Now I get connected, fine and set permission on the database roles.
1 thing I want to know, How Can I get the Windows Group name in the database, which has the same name as my SQL Login and Database Roles or User
I tried all SUSER_SNAME() and ... they all return NT AUTHORITYNETWORK SERVICE
I want to get AppPowerUser Role or windows group name. I think I should be able to because I am using windows authentication.
Any help is appreciated.
Mehdi

View 1 Replies View Related

Windows App Form Works: Datagrid Doesn't 'login Failed' ..tutors Out There?

Sep 11, 2005

Anyone live in seattle (meet on cap hill)? I have been stuck for weeks now and can't wait any longer wasting time - i will pay someone to set me up correctly quickly. I doubt this will be resolved online, but here goes... I need a datagrid to bring up simple database info (northwind) instead of showing the error 'login failed for mycomputeraspnet'. I am using windows authentication and my string is connectionstring = datasource=(local)\netsdk;initial catalog=Northwind;integrated security=sspi; persistent security=false;, I have seen online they say alter the authorization in the app virtual directory-- is that the C/inetpub/wwwroot or the web config of my project? I did so in the web config of my project, and also I added the impersonate=true to same already. I shared all the folders and made sure they are not read-only. I am flabbergasted.
Paul
XP pro 2004 sp 2
vis studio 2002 w updates
C# Asp web app project

View 2 Replies View Related

System.Windows.Form Assembly Is Needed On Script Component Task?

Jun 7, 2006

That affects only interface design... so that it doesn't exists at all in a SSIS.

What is it for??

Let me know your view on this or any clarification.

View 4 Replies View Related

Does A User Have To Have SQL Server Installed In Order For Windows Form To Connect To SQL 2005 Express DB

Apr 23, 2008

Hello,

I am creating a windows application that is not going to be used in a controlled environment like a LAN or some other network, so I want to include a local database in the install of this app. Ideally, I would like to use SQL 2005 Express like you would MSDE or Access, but I am not sure if the user must have SQL Server installed on their machine in order for this to work and I don't have a machine without it to test on.

Any help on this is greatly appreciated.

Thanks,
Derek

View 1 Replies View Related

One Form To Update Different SQL Tables Based Upon Form Selection

Apr 16, 2008

Hello,
My company Intranet has a form that agents can use to post their comments about the company to upper management, but our customer service department would like to modify the form so that the agent has to pick from a comment type.
The dropdown options on the form will be as follows:
ComplimentsComplaintsGeneral CommentsSuggestions
Each dropdown option has a designated table in a SQL DB.Using postback on the same page, I need to change which fields of the form are visible based upon which dropdown selection the user chooses, and I need the fields to then be inserted into the table that corresponds with the dropdown selection item.
For example: If the Compliments dropdown selection is picked, I need a text box to show for the user's location, the name of the customer, account number, and the message box. Once the submit button is clicked, the characters in these boxes need to be inserted into the Compliments table using its data adapter.
However, if the user selects Suggestions, the name of the customer and the account number should not be visible, since these fields do not exist and when the submit button is pressed, the Suggestions table should be updated.
If you need more information, I will provide whatever is needed.
As always, thanks for everyone's assistance.
Chris

View 3 Replies View Related

How To Make The SSMSE To Return Whole Records Without Any Close Query Form And Re-create Query Form Operation?

Dec 25, 2007

Hi,
I got a problem.
I installed Microsoft SQL Server Management Studio Express 2005 version.
And I created a Compact database.
I created an connection in SSMSE to connect the database and opened a query form.
then, i run the following sql:

Select * from Table1

It returned 3 records to me.
After that, I used program to insert record into this table.
Then i ran this sql again, it still show me 3 records.
I closed the query form, and re-created a new query form, then run the sql, it returned 4 records to me.

Why? It's very strange and difficult to operate, right?
Is there anyone know how to make the SSMSE to return whole records without any close query form and re-create query form operation?

Thanks a lot!

And Merry X'max!!!

View 4 Replies View Related

First Form Normalizations And Second Form Normalization

Jul 19, 2006

Hi everyone,
What is the main difference between first form normalizations and second form normalization ?
In my opinion, they are both generated for the same operation which is to prevent redundancy(in other words; duplication of data in several records).
So would you please explain it to me ?

Thanks

View 1 Replies View Related

Closing ADO Objects

Apr 4, 2007

I know it's "best practice" to dispose ado.net objects, but does it make a big difference if just the connection is closed? In other words, is the code below good enough or should the DataAdapter & Command be explicitly closed?using (SqlConneciton  cn = new SqlConnection(connstr)){ SqlDataAdapter da = new SqlDataAdapter(sql,cn);DataSet ds = new DataSet();da.Fill(ds); SqlCommand cmd = new SqlCommand(someOtherSql,cn);cmd.ExecuteNonQuery();  } 

View 2 Replies View Related

Closing SQL Connection

Sep 24, 2007

hello to alli am finding my self in confusing problem.
everyay log file of my application increase by 10 GB.every time i found more than 100 connections open in SDQL Server 2005 under my database.
i an using SQLHELPER Class by microsoft.i ma not putting my code in try-catch block. example
of one of my frequently used function is as follows:
        protected Int64 GetMemberID()        {            String SqlSelect = "SELECT * FROM MemberMaster WHERE MemberUserName= '" +
Session["UserName"].ToString() + "'";            SqlDataReader dr1 =
SqlHelper.ExecuteReader(ConfigurationManager.ConnectionStrings["CowcallConnectionString2"].T
oString(), CommandType.Text, SqlSelect);            while (dr1.Read())            {                CurrentMemberID = Int64.Parse(dr1["MemberID"].ToString().Trim());            }            return CurrentMemberID;        }
well i doubt i am opening connection and do not closing it. moreover i do not know how to close connection in above code when i am using sql helper class.please give me yours suggestion regarding my code even if it is not solving above two problems.

View 1 Replies View Related

Closing All Connections

Nov 15, 2004

How do I set up a job so that I close all open database connections? I think we have a leak in our code which causes our DB to go down (max connections used) roughly once every month, so we just restart the SQL server. Until we can find the exact problem I'd like to do this.

For simplicities sake let's say my database name is just "test."

Thank you.

View 4 Replies View Related

Connections Not Closing

Feb 23, 1999

I have an app that people frequently disconnect without a logout and the connection remains open in SQL Server. Does anyone know of a script or program that will go through and kill inactive connections?

View 1 Replies View Related

Closing The Sessions In SQL CE

Feb 27, 2008

Hi Friends,

We need a small suggestion regarding releasing the resources utilized before closing the session we established with the SQL CE database. To the best of our knowledge we are releasing the resources properly but still some how some resources get locked and we were not able to open a new session after closing the existing session.

Are there any functions or methods available to identify the existing resources, rowsets and other components who have connection with the existing session, kindly help us in this regard since we struck up mainly with this issue.
We work with EVC++ 3.0 and SQL CE 2.0

Thanks in advance.

Regards,
Sasi.

View 2 Replies View Related

Closing Dts.Connections

Mar 7, 2008



Hello:

I have the following script wrtten in VB that opens a connection to an Analysis Services db in a script task within my control flow:


Dim oConnectionSR As ConnectionManager

oConnectionSR = Dts.Connections("OLAPServer.Sales")


This script is used by a script task within each of three child packages that are called by a parent package. Each call is made to a different OLAP cube. The first package makes the connection and runs fine. When the second package runs, it still sees the connection value from the first package and fails.

What is the best way to close the connection once it is no longer needed? I have tried the dispose() method, and that did not work.

Thanks for your help!

Tim




View 4 Replies View Related

Closing A SQL Connection

Nov 1, 2007

I have a VB (sorry!) app using SQL Express DB. It was all created using the wizard so I didn't have to manually deal with opening connections etc.

Now, I need to be able to email the .mdf file from within the application, but I can't do this because the file is in use.

I have tried closing all forms with DB connections and then doing it but it takes around 6 minutes before the file becomes "free" and attachable to the email.

Can anyone suggest a way of releasing the file so that I can email it?

Many thanks,

Rich

View 6 Replies View Related

Closing Connection Problem

Jun 26, 2007

I have setup my loop to loop through textboxes and fill the according textboxes with data it retrives, if seems to work fine, but there is a problem with opening and closing the connection below is my codeint i = 0;for (i = 1; i <= 3; i++)
{
//This gets the stock ID from the textbox.string stock_ID = ((TextBox)Panel1.FindControl("txtID" + i.ToString())).Text;
//This is the sql statement.string sql = "SELECT [n_or_sh], [title], [cost_price], [selling_price] FROM tbl_stock WHERE stock_ID = " + stock_ID;
 
//This creates a sql command which executes the sql statement.SqlCommand sqlCmd = new SqlCommand(sql, myConn);
 
myConn.Open();
//This is a reader for the results to go in.SqlDataReader dr = sqlCmd.ExecuteReader();
//This reads the first result from the sqlReader
dr.Read();
//This sets the title label text to the value of the description column.TextBox currentBox1 = (TextBox)Panel1.FindControl("txtDesc" + i);
string strtxtDesc = currentBox1.Text;
strtxtDesc = dr["title"].ToString();
} // end of loop
myConn.Close();
} // end of button click
 i have tried putting the myConn.Close() in different places but it dosnt seem to work!
any advice or tips ?
RegardsJez

View 1 Replies View Related

Problem In Closing Connections

Feb 27, 2008

Hi Guys I am facing a problemI am getting error Timeout
expired. The timeout period elapsed prior to obtaining a connection
from the pool. This may have occurred because all pooled connections
were in use and max pool size was reachedI have checked
my whole code and no Connection leakage is there... but still
Connections are sleeping... I have increse my pool size to 500 and now
i have chaos of 500 sleeping connections... How ever
I have found that even after Opening Enterprize manager i can not kill
Process... How ever my administrator can kill the process from his
enterprize manager... Is there some problem with my credentials or do i need to find  out the leakage  in my code...How ever I have checked twice or thrice  but  my code is Ok and i have  Closed connection properly every where... I am using SQL Server 2000 and ASP.Net 1.1

View 5 Replies View Related

Opening And Closing The DB Connection

Mar 16, 2008

Hi most of my code follows the following format in a lot of my pages, my question is; Am i approaching it the right way in terms of performance, sql injection attacks and anything someone more knowledgeable than myself can think off, please feel free to criticise the code. Thank youprotected void Page_Load(object sender, EventArgs e)
{string strID = Request.QueryString["id"];
SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["streamConnectionString"].ConnectionString);SqlCommand command = new SqlCommand("stream_EventsByID", conn);
command.CommandType = CommandType.StoredProcedure;command.Parameters.Add("@eventID", SqlDbType.Int).Value = Request.QueryString["id"];
conn.Open();
SqlDataReader reader = command.ExecuteReader(CommandBehavior.CloseConnection);
eventList.DataSource = reader;
eventList.DataBind();
conn.Close();
}
}

View 7 Replies View Related

Closing A SqlDataReader After Calling From A DAL....?

Dec 12, 2005

I have a DAL that I'm trying to implement - the issue is that I want to call a reader from the DAL, but I'm not sure how to close it. I got best practices from MSDN (located here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemdatasqlclientsqldatareaderclasstopic.asp ) regarding the SqlDataReader, but can't seem to figure out how to close when using DAL.
Here is sample code in C#:
NOTE: Everything WORKS just fine, however in the DAL for GetRoutes, I can't seem to figure out how to close the reader (see comments in function):
mydatapage.aspx...//Populating some Drop Down List:private void ddlRoutes_SelectedIndexChanged(object sender, System.EventArgs e) {   SqlDataReader dr = DAL.GetRoutes(ddlRoutes.SelectedValue.ToString());   while (dr.Read())   {   .   .   .   }}
DataAccessLayer.cs...public static SqlDataReader GetRoutes(string sIdx){ cnn = new SqlConnection(ConnectionString);        cnn.Open(); SqlCommand cmd = new SqlCommand(); SqlParameter par = new SqlParameter(); cmd.Connection=cnn; cmd.CommandType = CommandType.StoredProcedure; cmd.CommandText = "sp_GetRoutes";
 return cmd.ExecuteReader();
        //Everything works above, however I would think that something        //like this SHOULD work, but doesn't:        //        // SqlDataReader dr;        // dr = cmd.ExecuteReader()        // return dr;        // cnn.close();   }
 

View 2 Replies View Related

Opening And Closing DB In Different Sub Routiens

Apr 20, 2006

If Someone could please show me some example VB code where i can open the my Sqlconnection in the Page_Load subroutien... and then close that SqlConnection in the Page_Unload routine. I want to be able to execute Sql command without having to re-open and re-close the connection.

Thanks,
Greg

View 4 Replies View Related

How Do I Bring In A Date Which Is In Integar Form Into A Databse As A Date Form.

Jul 23, 2005

HiI have a Platinum database which stores dates in integer form e.g the dateis formatted as below:Column_name Type Length Precision------------------------------ ------------------------------from_date int 4 10Some of the dates in the Platinum database are as follows:729115729359730059730241730302730455How can I bring them into SQL 2000 as valid dates.Thanks for your assistanceSam CJoin Bytes!

View 1 Replies View Related

Closing A Connection Created From A SQLDataSource

Jun 20, 2006

I'm new to ASP.NET and I've searched before posting. I have a simple form containing a FormView control. The FormView uses a SQLDataSource. This works fine and in 30 seconds I have a working form without writing any code.A form built this way causes problems with connection pooling because I am not closing the connection. What is the best method for me to remedy this? Every resource I've found explains that I have to explicitly close the connection. How do I do that in this case? Dispose the SQLDataSource in the FormView DataBound event? Rewrite the form so I can control opening and closing of the connection?Thanks in advance.

View 1 Replies View Related

SQL 2012 :: Closing A Security Hole

Jul 9, 2015

I have a purchased product that has a DB with several thousand tables in dbo. I can't change anything with the default dbo schema other than security. I have a table called dbo.ACCOUNT. It has information from multiple sites on it. I have a reporting team that need only access the information for SITE 1 on the ACCOUNT table and anything in the other 1000+ tables in the dbo schema.

I created a role (Analytics) and granted select access to dbo. I created a schema (Analytics) and assigned it the role. I created a view in the new schema called Analytics.ACCOUNT with a WHERE SITE = 1 clause on it. If they use the view, they see only the things they should. My problem is they can still do a select * from dbo.ACCOUNT and see everything they shouldn't see. How can I close that hole? I am not seeing a solution. If there is no way to fix this with roles/schemas/views, what else can I do?

Some of my pain points. I have this issue with about 30 tables. Creating custom table(s) to isolate data for each site will cost me another 2T of storage. Loading those custom tables every day would be cumbersome. Keeping the DDL in sync with the source table would be cumbersome. With the way I have it set up now, if I deny access to the source tables the view breaks because it needs access to the source tables to dynamically build the view. Here is the code I ran to create everything.

USE[DB]
--create test user login
CREATE LOGIN [Analytics_ETL] WITH PASSWORD=N'XXXXXXXXXXX'
GO
--create user in test database
CREATE USER [Analytics_ETL] FOR LOGIN [Analytics_ETL] WITH DEFAULT_SCHEMA=[Analytics]

[code]....

View 2 Replies View Related

Closing A Child Package After It Runs

Sep 18, 2007

Hello,

I have a package which runs several child packages. All works well and everything runs, but when it runs each of the children packages, it opens it, runs it and then it stays open. When the whole thing is done, there are about 25 or so open packages. Should they close after they run? Is there a setting I need to do this?

The point I am in SSIS is that I have gotten a decent feel for creating packages, but everything is still in debug mode. I need to take the next step to learn how to have this stuff run automatically or from a procedure outside the SSIS interface. Does that make any sense? If so, where can I learn about that.

Thanks for the help.

-Gumbatman

View 3 Replies View Related

SQL Server 2000 Not Closing Connections Help!!

Jan 31, 2008



I am experiencing a strange problem on a new installation of SQL Server 2000, installed on Windows 2003 server. SQL server has been service packed to SP3a

The users connect to the SQL database via an MS Access project front end, when they log out of the front end the SQL server still show them as connected in Management > Current activity > process info. I can kill the processes left behind but i am confused as to why this is happening.

The database was recently moved from an SQL installation on a Windows 2000 server to this new Windows 2003 server, the problem didnt occur on the old server and no upgrades have been applied to the database or the front end since the move, which makes me think something is not right about the install.

Any advice would be gratefully received

Thanks
Nick

View 1 Replies View Related

Vba RefreshAll Problem With Saving And Closing

Nov 27, 2007

Hi,

I'm writing a bit of code to open, refresh external data, save and close an Excel Spreadsheet, using the bit of code below:-



Private Sub CommandButton1_Click()



Application.Workbooks.Open ("X:sheet1.xls")



ActiveWorkbook.RefreshAll

ActiveWorkbook.Save



ActiveWorkbook.Close


End Sub


pretty noddy bit of code really. Problem is that it comes back with a message:-

"This action will cancel a pending reftesh data command. Continue?"

which requires my interverntion. If I supress messages using:-

"Application.DisplayAlerts = False"

the message does not appear but the spreadsheet closes without saving. If I put a delay (wait command) to pause the code for long enough for the refresh to complete it still doesn't save the refresh. I have also tried using "On Error" to force the code back to the "Save" statement until the refresh is complete and the error ceases, but again to no avail. It seems that the code is saving and closing before the refresh is complete.

I find it inconceivable that it's not possible to open, refresh, save and close a spreadsheet using vba. Can anyone help?

Many thanks

Graham

View 5 Replies View Related

Opening And Closing A Connection In A Loop, Should I Or Shouldn't I?

Oct 31, 2006

i have a loop that can run say 30k times.  in there i am using the try / catch / finally blocks to handle ADO.NET Transactions (thanks CADDRE!)Should i open and close the SQL Connection for each record? or open it and close it outside of the loop only once ?thanks in advance, mcm  

View 3 Replies View Related

Error Message Occurs When Closing IE7 Tabs

Feb 18, 2007

Ever since I installed Internet Explorer 7 I have recieved an error message when closing the browser tabs. It doesn't matter if I am closing one or all of the open tabs. Here is the message I recieve,

"Access violation at address 02050200 in module iesdsg.dll Read of address 25202E67"

This message didn't occur until I installed IE7. When I uninstall IE7 the message does not show up. Any insight would be appreciated.

View 4 Replies View Related

Closing And Reopening Tabs In Management Studio...

Nov 6, 2007

is there a way to avoid closing and reopening tabs in mgt studio when one task conflicts with another? For instance, I sometime look at a stored proc by scripting it as a create to a new query window. If I need to alter the db it is on, in a way that conflicts with a separate connection that is looking at a stored proc, I have to close the tab in which I was viewing the sp, run the alter, close that tab and then rescript the sp as a create in a new window.

View 6 Replies View Related

Analysis :: Closing Period With Date Dimension

Aug 11, 2010

I have a date dimension with below Hieararchy:

Year-->Quarter-->Month-->Week

Week is the lowest granular attribute.

Also i have a measure 'Holdings'

I would like to create calculated measure which should give me closing holdings at all levels(week ,Month,Quarter and year levels.) whichever i pull in the browse pane.

Below calculated measure would show the holdings for whatever the level you have specified.

([Measures].[Holdings],
ClosingPeriod( [DIM BI DATE].[Calendar].[WEEK], [DIM BI DATE].[Calendar].CurrentMember
))

But this measure shows the value for only week attribute.

for month,([Measures].[Holdings],ClosingPeriod( [DIM BI DATE].[Calendar].[Month],
[DIM BI DATE].[Calendar].CurrentMember ))

But my aim is to create a calculated measure to give closing value for any level.

View 13 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved