Browse Button (...) Is Not Available For A Variable That Is Flagged To EvaluateAsExpression

Sep 28, 2007

I have a new SSIS package that I add a new string variable to with the EvaluateAsExpression property set to True. In the Properties window, I click inside the Expression property, but do not receive the Browse Button (...) to launch the expression builder window.

This appears to be specific to my machine since this same package behaves as expected on other PCs. I have tried to build my expression in a text editor and paste it into the Expression property, but only the first line of the expression is pasted. Am I missing a configuration or install somewhere? Any thoughts on solutions or work arounds will be greatly appreciated.

View 5 Replies


ADVERTISEMENT

Logging Dynamic SQL Variable When EvaluateAsExpression=TRUE

Oct 24, 2006

I am trying to use the idea as mentioned by Jamie at:
http://blogs.conchango.com/jamiethomson/archive/2005/12/09/2480.aspx
which is to build dynamic SQL using a variable evaluated as an expression.

Set Expression="SELECT * FROM MyTable WHERE MyColumn = " + @[VariableContainingFilterValue]

Everything works fine. The entire package works.
My next step is to log the variable so that I know, after package execution, exactly what SQL statement the package is executing.
I tried to do it by a couple of ways in a Script task:

1) Dts.Events.FireInformation(0, String.Empty, String.Format("SQL: {0}", Dts.Variables("SourceSQL").Expression), String.Empty, 0, False)

Gives me just an expression without actually evaluating it

2) Dts.Events.FireInformation(0, String.Empty, String.Format("SQL: {0}", Dts.Variables("SourceSQL").Value), String.Empty, 0, False)

Produces an error:
The expression for variable €œSourceSQL€? failed evaluation. There was an error in the expression.


Regards,
Yitzhak

View 7 Replies View Related

SQL 2012 :: Set SSIS EvaluateAsExpression Property Of Variable To TRUE?

Jul 23, 2015

Where do you set an SSIS EvaluateAsExpression property of the variable to TRUE?

[URL]

View 3 Replies View Related

Variables - EvaluateAsExpression.

Dec 4, 2007

Hi,

A few Q's if I may:


When configuring a variable you have to set its Value, even if EvaluateAsExpression = TRUE and an expression is specified. Presumably the Value is a compile-time default which holds until runtime?

I have 2 Execute SQL tasks preceeding a Data Flow Task. Precedence constraints require both Exec SQL Tasks to have completed successfully, before the data flow task can be entered. Each Exec SQL Task sets a variable, and a 3rd variable, which is evaluated as an expression, is a function of the 1st 2. Does the expression get re-evaluated automatically+immediately, every time one or both of its dependent variables' values changes? Thus can it be GUARANTEED that the 3rd variable has indeed been re-evaluated BEFORE the data flow is entered?

Per 1000 runs I get a dozen or so of the following errors: 'expression for variable ... failed evaluation. There was an error in the expression.' Any ideas..?

View 3 Replies View Related

Best Way To Check If A Boolean Field Is Flagged

Oct 15, 2007

I have a long query that returns a table like:

ID Name bool
1 Joe 0
2 James 0
3 John 1

When the boolean field is equal to 1 for any of the records I would like to return an empty record set. What is the best way to do this?

I know I could use IF EXISTS but my query is so long that I would prefer not to repeat the query multiple times. Is there an alternative?

View 5 Replies View Related

Identity Columns Not Flagged In INFO_SCHEMA.column

Nov 9, 2006

Morning...

I've attempted several searches to find my answer but they're not quite the answer Im looking for.

We have a large VB6 system that currently sits on an informix database and I've been given the task of shifting it
onto SQL Server (Note: with as little impact to the code as possible - runtime speed will not be an issue at this early stage)

To cut a long story short, I'm hoping to find where relevent columns are shown as being an identity column.

I expected to see it in INFORMATION_SCHEMA.columns but its not in there (at least not that I can see)


Anyone point me in the right direction?


Cheers
Aaron.

View 3 Replies View Related

SQL 2012 :: Transaction Logs Not Backed Up On AGs Although Flagged As Successful

May 13, 2014

We use AlwaysOn availability groups, which has 2 SQL nodes configured (version: 11.0.3373.0), my full and differential backups are working for all my databases, however I am unable to perform any LOG backups.

I have double checked my Availability Group settings, and the backup preferences is set to: 'Prefer Secondary'

I've tried creating a maintenance job as well as using Ola Hallengren's maintenancescript job to back them up, but nothing is written to the drive. All jobs return successful every time, and take less then 3 seconds to run. There are no events being written in the SQL error log or event log.

View 2 Replies View Related

For Browse Causes Error 511

Apr 10, 2000

We have a SELECT query that includes a FOR BROWSE clause and an ORDER BY clause that produces a 511 error (Updated or inserted row is bigger than maximum size) whenever we run it. The statement does not perform any inserts or updates. We have service pack 5a installed.

Any help greatly appeciated.

View 1 Replies View Related

Can't Browse Cubes

Jan 22, 2003

I use the SQL Analysis Manager to create a cube and it can process successful, but when i want to browse the cube, it shows the error message: " Unable to browse the cube "my cube name", Unspecified error"

can anybody tell me what's wrong with that? thanks

View 2 Replies View Related

Can Not Browse Dimension

Jan 13, 2006

hello all,

I'm learning SSAS2005 I've installed and currently are running throught he
tutorials.

I've run into a problem where i'm able to process the cube with no errors.
i'm able to browse the cube with no probems.

however when I open a dimension and try to browse the dimension I get the
following error.

"Input String was not in a correct format"

I was able to save the project to another users machine and run without
problems. So we know it has to do with a set up on my machine.

any ideas are appreciated.
thanks

View 1 Replies View Related

How To Browse Cubes On Web

Mar 22, 2007

how to do I use these cubes on web for browsers as I do in business intelligent IDE in visual studio. Are there any free component available for web throught which cubes dtaa can be browsed or are there any methods available in SQL server to publish cubes to web

Any help in this regard will greately appriciated.
Thanks

View 2 Replies View Related

Cannot Browse Cube, Please Help

Aug 21, 2007

I have installed SQL Server 2005 on a server which runs Windows Server 2003 with SP2. And I have two client machines, both running Windows XP with SP2. Machine A has a full version of SQL server 2005 installed, including database engine, analysis service server, reporting service server. Machine B only has workstation components installed, BI development studio, SQL Server management studio.

I have developed a couple of analysis service projects and deployed to the server. On machine A, I can connect to the server and browse cubes no problem. On manchine B, I still can connect to the server and see the projects I deployed, even browse dimensions data. But when I browse cubes, management studio will be hanging there, not doing anything. Eventually I will have to kill it. I also opened the projects on machine B from BI management studio and try to browse data from there, it shows 'loading data' and doesn't do anything either.

Does anyone experience this type of issue? It's really frustrating as it doesn't show me any error message.

Thanks for any help.

View 1 Replies View Related

Cannot Browse Data

Dec 21, 2006

I try "open table -> Return all rows" , There is an error like

"Database Server: Microsoft SQL Server

Version: 08.00.0760

Runtime Error: [Microsoft][ODBC Driver Manager] Driver does not support this parameter"





View 1 Replies View Related

Can't See Any Data When I Browse The Cube

Aug 9, 2004

Hi,

I have made sure that I am a member of OLSP Adminstrator group on the server and everything seems to work al the way till design storgae and cube processing but then when I browse the cube, I do not get any data :confused:

Can someone kindly help and guide please.

Many thanks.

View 7 Replies View Related

Problem To Browse My Cube

Nov 26, 2005

Hello!
i am new user with the Analysis servises.
i started by doing the tutoraiol for MyFirstCube.
i performed the action step by step and succeded to create the cube. when i am trying to browse it iget this massage:
"unable to browe the cube" in the Cube browser.

do you know what is the problem?
what shoul i do?

thanks in advance

:confused:

View 2 Replies View Related

User Can Browse But Can't Export

Nov 21, 2007

Has anyone seen this before? I have users that can browse the reports on Report Manager, but when they attempt to Export them to Excel, it doesn't work. I've tried the export myself under two different logins (one is only Browser and the other has full rights) and both work fine. When I export, the second IE window opens and the Save/Open/Cancel dialog pops up as it should. When these two users attempt the same thing, no second window opens. The blue status bar at the bottom of their existing IE window fills to show progress and then they see "Done" in the status bar at the bottom. But nothing happens.

I've compared every IE configuration setting I can find with another machine that I'm testing on and can find no differences.

Any thoughts?

View 1 Replies View Related

Browse Through A List Of Databases On A Given Server

Nov 11, 2004

Hi,

I would like to allow the user of my ADO.NET application to browse through a list of the available databases on a given server. INFORMATION_SCHEMA in SQL Server Books Online doesn't describe how to do this. How can I do this?
TIA,
Royce

View 2 Replies View Related

Browse Tables In A Linked Server

Dec 3, 2007

Reference:
http://support.microsoft.com/kb/306397
http://www.databasejournal.com/features/mssql/article.php/10894_3290801_2

In enterprise manager, I can browse the objects by clicking on "Tables" under the selected linked server, and that allows me to browse my objects in that server and eventually design my query graphically.

In SQL Server 2005 Express, I know that I cannot browse the objects after referring to microsoft article above.
"Note In SQL Server Management Studio, you cannot expand the new linked server name to view the list of objects that the server contains. "

However, is it possible to design my query graphically?

View 1 Replies View Related

Can We Use MAC PC To Browse The Report From Reporting Services?

Jun 11, 2007

Hi All,

I had to build the report on reporting services 2005. My clients they used the MAC pc to connect my report server. But they can not bowse the report. So, I'd ike to know Is Reporting Services support MAC PC?

Anyone can help me.

Rgds.,
Chawalit

View 1 Replies View Related

Can Not Browse To Http://localhost/reports

Feb 15, 2007

This is the error I get:
Object not found!

The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.

If you think this is a server error, please contact the webmaster.
Error 404
localhost
Thursday, February 15, 2007 12:50:47
Apache/2.0.54 (NETWARE) mod_jk/1.2.14

View 4 Replies View Related

Unable To Browse The Cube '????', Unspecified Error.

Sep 27, 2002

Hi,

I have processed the data successfully for the cube after desiging storage as MOLAP with 50% performance gain. When I tried browse the data I am getting the followign error.

Unable to Browse the cube 'cubename', Unspecified error.

Any help please.

Regards
John Jayaseelan

View 3 Replies View Related

Have A Problem To Browse The Data In Analysis Server

Dec 1, 2004

:mad: Dear Sir/Madam,

I have a problem to browse the data in analysis server, it displayed: unspecified error, my os is windows xp with sp1 and sql server2000 installed, Do i need to install AS SP3 on the server, but, what are AS SP3 stand for, any other solution?

Rgds,
chen

View 1 Replies View Related

Error When Trying To Browse SSRS On A Remote Machine

Aug 29, 2007

Hi,

I deployed SSRS reports to my local report server and set the connection string to access a server on the network with Analysis Server.

Result:
I can access and use the reports from my computer. But when I use any other computer on the network I can't use the reports. I can access them but they don't find the database ant therefor they don't present any data.

Error message as folows: "An error has occurred during report processing. (rsProcessingAborted) Get Online Help
Cannot create a connection to data source 'dsAnalys'. (rsErrorOpeningConnection) Get Online Help
Database 'Analys' does not exist. "

This works fine on my local machine, the error comes only when i try to browse on a remote machine. I am using SQL Server 2005

Any help would be appriciated!!!

Thanks in advance,
Chanduu

View 5 Replies View Related

How Can I Browse The Tree Graph In DataMining DecisionTrees By C# Coding ?

May 19, 2006

I build my DataMining DecisionTrees in SQL Server 2005.

How can I get the tree graph in DataMining DecisionTrees by C# coding ?



View 4 Replies View Related

Open Cube To Browse Takes Very Long Time

Dec 28, 2006

I broke up my cube into 24 partitions. There are about 630M total fact rows in that cube.

When I open the cube to browse in BIDS or SQL Management Studio it takes very long time to open (I think 30 minutes).

Profiler does not show that it's running a query, but messages like this keep appearing throughout the time it's opening to browse:

Progress Report Begin, 14- Query, Started reading data from the 'p0' partition.
Progress Report End, 14- Query, Finished reading data from the 'p0' partition.
Progress Report Begin, 14- Query, Started reading data from the 'p10' partition.
Progress Report End, 14- Query, Finished reading data from the 'p10' partition.

and goes on like that....

View 13 Replies View Related

SSIS - Browse MSDB Stored Packages Error

May 10, 2007

I've just installed sql 2005x64 and sp2 on a active/passive cluster on 2003. Everything is working fine except browsing the stored msdb packages in SSIS. Remote acces is enabled - as are named pipes. I've tried doing this on the local server as well. I was able to create a maintenance plan and run it with no problems.



We got an error during the install pertaining to SSIS, but hit ignore and it went on successfully.



It was - failed to install and configure assemblies .....MSMQTask.dll in the com+ catalog. Error -2147467259.

description: Error HRESULT E_FAIL has been returned from a call to a COM component.



The browsing error is below.



Thanks!

Sam







TITLE: Microsoft SQL Server Management Studio
------------------------------

Failed to retrieve data for this request. (Microsoft.SqlServer.SmoEnum)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476

------------------------------
ADDITIONAL INFORMATION:

The SQL server specified in SSIS service configuration is not present or is not available. This might occur when there is no default instance of SQL Server on the computer. For more information, see the topic "Configuring the Integration Services Service" in Server 2005 Books Online.

Login timeout expired
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.
Named Pipes Provider: Could not open a connection to SQL Server [2]. (MsDtsSrvr)

------------------------------
BUTTONS:

OK
------------------------------


View 4 Replies View Related

Analysis :: Unable To Browse Data When Adding Multiple Dimensions?

Jul 5, 2015

I have one dimension and one measure group. I deployed and processed the cube. Now I am able to browse the data. Now I added one more dimension. I deployed and reprocessed again the Cube. Now I am not able to see any values.  I am getting like below.

View 6 Replies View Related

Wierd, Yet Cool.. Can Login/browse To Server Remotely, But Not Locally.

Jun 11, 2007

I can access the report server remotely. However, when I try to access via browser locally, no luck. I get access denied.

Some kind of browser diff maybe?



I noticed that on the browsers/machines that work, I have the option of putting the domain in seperately. The browser that doesnt work (on the same machine as the db server and web site) puts the domain in front of the username for me.



Any ideas?

View 1 Replies View Related

SQL Reporting Services: Cannot Browse Http://localhost/Reports [Unique Issue]

Jan 10, 2008

Hi,
It has been one week I am researching this issue on internet and trying everything I find. But no luck. What I am trying to do is to install SRS on SQL 2005 Enterprise Edition. The reporting services configuration tool has "All Green" check marks. When I browse either of http://localhost/Reports and http://localhost/ReportServer it prompts for password. I am logged on to domain administrator account, I have tried all users' passwords it gives 401.1 error.

I have tried accessing it from another machine or by using loopback ip or machine name; it doesnt work.


Would somebody have any clue to it ?


Thanks,
Fahad

View 3 Replies View Related

SQL Server Mobile 2005 Merge Replication Failing Over SSL, But Can Browse Through Pocket IE.

Jan 28, 2008

Hi All, this system is scheduled to go live in near to a day... but i have hit an issue when switching on SSL. Any help would be greatly appreciated.

Device Env:
Windows Mobile 5.0 + Messaging and Security Feature Pack
SQL Server Mobile 2005.

Merge replication works fine without SSL. After running the Configure Web Sync wizzard to setup SSL merge replication no longer works. Note i checked using pocket IE by browsing to https://mycompany.com/pub/sqlcesa30.dll?diag and all worked fine. There was no prompt saying the cert was bad etc.

The certificate is a:
Equifax secure global ebusiness CA-1 cert.
Signature algorithm md5RSA
public key RSA(1024 bits)
thumbprint algorithm sha1

Stacktrace given is:
- ex {"A request to send data to the computer running IIS has failed. For more information, see HRESULT."} System.Data.SqlServerCe.SqlCeException
- Errors {System.Data.SqlServerCe.SqlCeErrorCollection} System.Data.SqlServerCe.SqlCeErrorCollection
Count 1 Integer
Item In order to evaluate an indexed property, the property must be qualified and the arguments must be explicitly supplied by the user. System.Data.SqlServerCe.SqlCeError
HResult -2147012858 Integer
InnerException Nothing System.Exception
Message "A request to send data to the computer running IIS has failed. For more information, see HRESULT." String
NativeError 28037 Integer
Source "Microsoft SQL Server 2005 Mobile Edition" String
StackTrace "at System.Data.SqlServerCe.NativeMethods.CheckHRESULT()
at System.Data.SqlServerCe.SqlCeReplication.Synchronize()
at MyApp.Helper.Replication.SynchronizeInit()
at MyApp.CallSynchronize()
at System.Windows.Forms.Control.OnGotFocus()
at System.Windows.Forms.Control.WnProc()
at System.Windows.Forms.ContainerControl.WnProc()
at System.Windows.Forms.Form.WnProc()
at System.Windows.Forms.Control._InternalWnProc()
at Microsoft.AGL.Forms.EVL.EnterMainLoop()
at System.Windows.Forms.Application.Run()
at MyApp.Program.Main()

View 2 Replies View Related

Analysis :: How To Save Parameter From A Report Created In Browse View Under Cube

Nov 10, 2015

After connected to Analysis Services and following the path below:

Analysis Service - Databases - Cubes

I create the parameters for a custom report after right click on a specific Cube and select Browse to arrive at a view where i can define dimensions and parameters as well as drag and drop measure to the report rows and columns. The left top File bottom only give me a Save Selection or Save ALL option. However, i'm not sure where it saves it to or if it saves the settings for this custom report at all.

I pull this report monthly and it's a pain to recreate all the parameters. How to save this template for future pulls or maybe even incorporate the pull into excel for monthly refresh instead?

View 3 Replies View Related

SQL && C# Help On A Button Click!!!

Mar 7, 2008

Hey Guys,
I'm not sure if anyone can help me with this but I am trying to achieve the following:
I have a row (In this case it is information on a fix) and on a button click I am trying to get it to "archive" it.  At the moment I have it so that it it takes the current information and adds it to the archive table adding an archive date.  The thing that I am struggling with is incrementing the version number. So, I need it to (in these steps I think) - Look for existance of the other entires of that ID, look for the version number that is related to the newest date of those knowledgeIDs and then add 1 to it.  If that knowledgeID doesnt exist then add it as one.
My current code is below:
Thanks in Advance =)
C# Codeprotected void Page_Load(object sender, EventArgs e)
{UserName = (string)Session["UserName"];
Label4.Text = UserName + " Is Current Logged In";UserType = (string)Session["UserType"];if ((Session["UserName"] != null) & (UserType == "Helpdesk"))
{Response.Redirect("Accessrights.aspx");
}else if (Session["UserName"] == null)
{Response.Redirect("Login.aspx");
}
FixName = "default";Description = "default";File = "default";
ADate = myCalendar.TodaysDate.ToShortDateString();
AddDate = Convert.ToDateTime(ADate);myConnectionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=C:\inetpub\wwwroot\HOF\App_Data\HOF.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True;";
}protected void Button1_Click(object sender, EventArgs e)
{SqlConnection myConnection = new SqlConnection(myConnectionString);
try
{
FixName = TextBox1.Text;
 SqlCommand myCommand = new SqlCommand("select * from Knowledge WHERE FixName like '%" + FixName + "%'", myConnection);
myConnection.Open();SqlDataReader myReader = myCommand.ExecuteReader();if (myReader.HasRows)
{while (myReader.Read())
{
TextBox1.Text = myReader["FixName"].ToString();TextBox2.Text = myReader["Description"].ToString();
File = myReader["Location"].ToString();if (File != null)
{
TextBox3.Text = File;
}
else
{TextBox3.Text = "There is no script avaliable";
}KnowledgeID = myReader["KnowledgeID"].ToString();Add = myReader["DateAdded"].ToString();
}
myConnection.Close();
}
else
{TextBox1.Text = FixName + "Does not Exist. Please try again.";
}
}catch (Exception ex)
{
myConnection.Close();
}
try
Description = TextBox2.Text;File = Convert.ToString(FileUpload1.FileName);if (CheckBox1.Checked == true)
{SAPPS = "True";
}
else
{SAPPS = "False";
}
{SqlCommand mycommand2 = new SqlCommand("INSERT INTO Knowledge (FixName, Description, Location, DateAdded, DateArchived, Version, KnowledgeID) SET ('" + FixName + "','" + Description + "','" + File + "','" + Add + "','"+AddDate+"','" + SAPPS + "','"+I NEED A VALUE HERE+"','"+KnowledgeID+"')", myConnection);SqlDataAdapter myDataAdapter = new SqlDataAdapter(mycommand2);
sa = mycommand.ExecuteNonQuery();
myConnection.Close();
}catch (Exception ex)
{
myConnection.Close();
}
}
 

View 2 Replies View Related

Web Form Button ?

Sep 24, 2004

I need to make a query to a SQLserver db passing values from a dropdownlist and two text boxes as my criteria. Now if nothing is selected and the button is pressed, I would like to return everything that is part of my Select statement. I am having trouble making my sql statement work.

Im sending you my code as an attachment. I've put * around the area i really need help with.

Even if you could just point me in the right direction as to where to look for a good web forms book using VB.NET and ASP.NET I would really appreciate it.

Thanks,

Jose
AIM- RangerBud249
Yahoo- RangerBud249


Imports System.Data.OLEDB
Imports System.Data
Imports System.Data.SqlClient
Public Class Test
Inherits System.Web.UI.Page
Public dbConn As SqlConnection
Public da As SqlDataAdapter
Protected WithEvents txtStart As System.Web.UI.WebControls.TextBox
Protected WithEvents txtEnd As System.Web.UI.WebControls.TextBox
Protected WithEvents Calendar1 As System.Web.UI.WebControls.Calendar
Protected WithEvents Label1 As System.Web.UI.WebControls.Label
Protected WithEvents img_cal1 As System.Web.UI.WebControls.ImageButton
Protected WithEvents img_cal2 As System.Web.UI.WebControls.ImageButton
Public ds As DataSet

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'the TailNumber is the first thing that will load
If Not Page.IsPostBack Then
lstAircraft.DataSource = GetAircraft() 'this function will load the Tail Numbers
lstAircraft.DataValueField = "TailNumber"
lstAircraft.DataTextField = "TailNumber"
lstAircraft.DataBind()
End If
End Sub

Function GetAircraft() As System.Data.DataSet
'this function will load the Tail Numbers
Dim connectionString As String = "connection info"
Dim dbConnection As System.Data.IDbConnection = New System.Data.SqlClient.SqlConnection(connectionString)

Dim queryString As String = "SELECT [Aircraft].[TailNumber] FROM [Aircraft]"
Dim dbCommand As System.Data.IDbCommand = New System.Data.SqlClient.SqlCommand
dbCommand.CommandText = queryString
dbCommand.Connection = dbConnection
Dim dataAdapter As System.Data.IDbDataAdapter = New System.Data.SqlClient.SqlDataAdapter
dataAdapter.SelectCommand = dbCommand
Dim dataSet As System.Data.DataSet = New System.Data.DataSet
dataAdapter.Fill(dataSet)

Return dataSet
End Function

******************************************************************************************************************
this is the area I really need help with

Sub btm_Submit_Click(ByVal sender As Object, ByVal e As EventArgs)
Dim connectionString As String = "connection info"
Dim dbConnection As System.Data.IDbConnection = New System.Data.SqlClient.SqlConnection(connectionString)
dbConnection.Open()
dbConnection.Close()
Dim selection As String
Dim startTime As String
Dim landingTime As String
Dim flights As String

Dim selString As String = "SSELECT AircraftID, fromLocation, startTime, toLocation, landingTime, ID, Filename, VSU, local_1 FROM Flights, tbl_FileNames, tbl_VSU"

Dim commandString As String = "SELECT [Flights].AircraftID, [Flights].fromLocation, [Flights].startTime, [Flights].toLocation, [Flights].landingTime, [tbl_FileNames].ID, [tbl_FileNames].Filename, [tbl_FileNames].VSU, [tbl_FileNames].local_1 FROM Flights, tbl_FileNames, tbl_VSU"

selection = "where " & Me.lstAircraft.SelectedValue.ToString & " " & startTime = Me.txtStart.Text & " " & Me.txtEnd.Text = landingTime & " " & [Flights].[ID] = [tbl_VSU].[flight_id]) AND [tbl_VSU].[filename_id] = [tbl_FileNames].[ID]"
If Me.txtStart.Text <> "" Then
selString = selString & selection
End If
Session("SelStr") = selString

Dim dbCommand As New OleDbCommand(commandString, dbConnection)

DataGrid1.DataSource = GetFlights(lstAircraft.SelectedValue)
DataGrid1.DataBind()
End Sub
*********************************************************************************************************************

Function GetFlights(ByVal ID As Integer) As System.Data.DataSet
Dim connectionString As String = "connection info"
Dim dbConnection As System.Data.IDbConnection = New System.Data.SqlClient.SqlConnection(connectionString)

Dim queryString As String = "SELECT [Flights].[toLocation], [Flights].[startTime], [tbl_FileNames].[ID], [Flig" & _
"hts].[fromLocation], [tbl_FileNames].[filename], [tbl_FileNames].[Local_1], [Fli" & _
"ghts].[AircraftID], [Flights].[landingTime], [tbl_FileNames].[VSU] FROM [Flights" & _
"], [tbl_FileNames], [tbl_VSU] WHERE (([Flights].[ID] = [tbl_VSU].[flight_id]) AN" & _
"D ([tbl_VSU].[filename_id] = [tbl_FileNames].[ID]))"
Dim dbCommand As System.Data.IDbCommand = New System.Data.SqlClient.SqlCommand
dbCommand.CommandText = queryString
dbCommand.Connection = dbConnection

Dim dataAdapter As System.Data.IDbDataAdapter = New System.Data.SqlClient.SqlDataAdapter
dataAdapter.SelectCommand = dbCommand
Dim dataSet As System.Data.DataSet = New System.Data.DataSet
dataAdapter.Fill(dataSet)

Return dataSet
End Function

Private Sub img_cal1_Click(ByVal sender As System.Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles img_cal1.Click
'this will make the calendar for start visible when clicked and not visible if clicked again
Session("Cal1") = True
Session("Cal2") = False
Me.Calendar1.Visible = True
End Sub


Private Sub img_cal2_Click(ByVal sender As System.Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles img_cal2.Click
'this will make the calendar for end visible when clicked and not visible if clicked again
Session("Cal2") = True
Session("Cal1") = False
Me.Calendar1.Visible = True

End Sub

Private Sub Calendar1_SelectionChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Calendar1.SelectionChanged
'this will put the date selected in my text box as a short date
If Session("Cal1") = True Then
txtStart.Text = Calendar1.SelectedDate.ToShortDateString
Session("Cal1") = False
ElseIf Session("Cal2") = True Then
txtEnd.Text = Calendar1.SelectedDate.ToShortDateString
Session("Cal2") = False
End If
Me.Calendar1.Visible = False

End Sub


End Class

View 1 Replies View Related







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