Using Access Form Control As SQL Function Criteria

Jul 28, 2006

I have a combo box named [myControl] on an Access form that I can use to select/enter a site name (ABC). There is a button on the same form that runs a report. The underlying record source for the report is a SQL Function. Is there an easy way to pass the combo box value to the SQL Function so that only records for site 'ABC' are displayed in the report? I tried Forms![myForm]![myControl] in the criteria box of the Function and it did not work. THANKS!

View 3 Replies


ADVERTISEMENT

Programmatically Getting The Field Values Form An Sqldatasource Control

Oct 10, 2006

Im ripping my hair out here.I need to access the field in a datasource control of use in non presentation layer code based actions.I know the I can use a code base connection and query but I dont see why i need to make two trips the the DB when the info is already available.The datasource is attached to a details view control and the details view control is nested in a loginview controlI've tried defining but all I can get in the header name of the field but not the dataitem, the dataitem causes an error  help please jim

View 4 Replies View Related

How To Leave The Focus In A Control When Click In Any Part Of The Form.

Jul 2, 2007

Hi there,

I have a form with textbox, combos, ect... I'd like to know how I can make to leave the focus of one of this control when i click in any part of the form that is not a control, and so it's not focusable.



cheers.

View 1 Replies View Related

Need Help Submitting Form Data To SQL 2005 Database Using SqlDataSource Control

Apr 18, 2006

I have a form setup, the code of which is listed below, and I would like to be able to submit the data that is entered in the form to a SQL 2005 standard database via the SqlDataSource control and a button. I'm just having trouble doing so because of the coding. Any help or suggestions would be greata s I've already read through the tutorials on this site and they don't go in depth very much. Thanks!
<%@ Page Language="VB" %>
<%@ Register Assembly="BasicFrame.WebControls.BasicDatePicker" Namespace="BasicFrame.WebControls"
TagPrefix="BDP" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ import Namespace="System.Data" %>
<%@ import Namespace="System.Data.SqlClient" %>
<Script runat="server">
Private Sub InsertData(ByVal Source As Object, ByVal e As EventArgs)
SqlDataSource1.Insert()
End Sub
</Script>
 
 
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Weston E-Vault - New Customer Sign-Up Form</title>
</head>
<body>
<form id="form1" runat="server">
<div style="text-align: center">
&nbsp;<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="Data Source=C26819_24561;Initial Catalog=ebackups;Integrated Security=True;User Instance=False" ProviderName="System.Data.SqlClient" InsertCommand="INSERT INTO backup_info(cust_name, cust_phone, cust_contact, cust_analyst, storage_plan, install_date, backup_data, backupexec_option, backup_program, cust_email) VALUES (@cust_name, @cust_phone, @cust_contact, @cust_analyst, @storage_plan, @install_date, @backup_data, @backupexec_option, @backup_program, @cust_email)">
<InsertParameters>
<asp:ControlParameter ControlID="DropDownList1" DefaultValue="" Name="@cust_name"
PropertyName="SelectedValue" />
<asp:ControlParameter ControlID="TextBox1" Name="@cust_contact" PropertyName="Text" />
<asp:ControlParameter ControlID="TextBox2" Name="@cust_phone" PropertyName="Text" />
<asp:ControlParameter ControlID="DropDownList3" Name="@cust_analyst" PropertyName="SelectedValue" />
<asp:ControlParameter ControlID="BDPLite1" Name="@install_date" PropertyName="Controls" />
<asp:ControlParameter ControlID="TextBox3" Name="@cust_username" PropertyName="Text" />
<asp:ControlParameter ControlID="TextBox4" Name="@cust_password" PropertyName="Text" />
<asp:ControlParameter ControlID="DropDownList2" Name="@storage_plan" PropertyName="SelectedValue" />
<asp:ControlParameter ControlID="TextBox5" Name="@backup_data" PropertyName="Text" />
<asp:ControlParameter ControlID="RadioButtonList1" Name="@backupexec_option" PropertyName="SelectedValue" />
<asp:ControlParameter ControlID="TextBox6" Name="@backup_program" PropertyName="Text" />
<asp:ControlParameter ControlID="TextBox7" Name="@cust_email" PropertyName="Text" />
</InsertParameters>
</asp:SqlDataSource>
&nbsp;
<br />
<br />
<br />
<table>
<tr>
<td style="width: 100px">
<img src="/images/westonevault_logo.jpg" /></td>
<td style="width: 703px; text-align: right">
<asp:Button ID="Button1" runat="server" BackColor="White" BorderColor="Navy" BorderStyle="Solid"
BorderWidth="1px" Font-Names="verdana" Font-Size="Small" ForeColor="Navy" PostBackUrl="~/secure/tech_home.aspx"
Text="Back" /><span style="font-size: 8pt; color: #000099">&nbsp;</span></td>
</tr>
</table>
<br />
<br />
<img src="/images/div.jpg" style="font-size: 8pt; color: #000099" /><br />
<br />
<div style="text-align: center">
<table style="font-size: 8pt; width: 730px; color: #000099; font-family: Verdana">
<tr>
<td colspan="3" style="font-weight: bold; font-family: Verdana; text-align: left">
<span style="color: #000099">Customer Information<br />
</span>
<hr style="color: #000099" />
<span style="font-weight: normal; font-size: 8pt; color: #000099">Please enter all customer
data as accurately as possible. Any incorrect information on this form may result
in incorrect data being backed up, reports not reaching the customer or they may<span
style="font-size: 12pt"><strong> </strong><span style="font-size: 8pt">not receive the need</span></span>ed amount of disk
space.<br />
&nbsp;<br />
</span>
</td>
</tr>
<tr style="font-size: 8pt">
<td style="width: 174px; text-align: left">
<span style="font-family: Verdana"><span style="color: navy">Customer
Name:<br />
</span>
<asp:DropDownList ID="DropDownList1" runat="server" DataValueField="cust_name" Font-Names="Verdana"
Font-Size="X-Small" ForeColor="Navy" Width="178px">
<asp:ListItem Selected="True">Select Customer Name.....</asp:ListItem>
<asp:ListItem>Alaska Road Boring</asp:ListItem>
<asp:ListItem>Allen and Peterson</asp:ListItem>
<asp:ListItem>AK Guns</asp:ListItem>
<asp:ListItem>ATS Alaska</asp:ListItem>
<asp:ListItem>BC Contractors</asp:ListItem>
<asp:ListItem>Bek of Alaska</asp:ListItem>
<asp:ListItem>Brokentop Community Assoc.</asp:ListItem>
<asp:ListItem>COHRA</asp:ListItem>
<asp:ListItem>Crisis Pregnancy Center</asp:ListItem>
<asp:ListItem>Gaines and Co.</asp:ListItem>
<asp:ListItem Value="Gil Damond">Gil Damond</asp:ListItem>
<asp:ListItem>GMW Fire</asp:ListItem>
<asp:ListItem>Integrity Funding</asp:ListItem>
<asp:ListItem>La Pine Community Clinic</asp:ListItem>
<asp:ListItem>La Pine Fire District</asp:ListItem>
<asp:ListItem>Lumbermens Ins.</asp:ListItem>
<asp:ListItem>Murray</asp:ListItem>
<asp:ListItem>NEI</asp:ListItem>
<asp:ListItem>Northstar Center</asp:ListItem>
<asp:ListItem>Redi Electric</asp:ListItem>
<asp:ListItem>Robberson Ford</asp:ListItem>
<asp:ListItem>South Anchorage District Office</asp:ListItem>
<asp:ListItem>St. George Tanaq</asp:ListItem>
<asp:ListItem>Stinebaugh</asp:ListItem>
<asp:ListItem>THT Electric</asp:ListItem>
<asp:ListItem>Watterson</asp:ListItem>
<asp:ListItem>United Auto</asp:ListItem>
<asp:ListItem>Weston - ANC</asp:ListItem>
<asp:ListItem>Weston - BND</asp:ListItem>
<asp:ListItem></asp:ListItem>
</asp:DropDownList><br />
</span>
</td>
<td style="width: 187px; text-align: left">
<span style="font-family: Verdana"><span style="color: #000099">Customer
Contact:<br />
</span>
<asp:TextBox ID="TextBox1" runat="server" Font-Names="Verdana" Font-Size="X-Small"
Width="164px"></asp:TextBox><br />
</span>
</td>
<td style="width: 136px; text-align: left">
<span style="font-family: Verdana"><span style="color: #000099">Customer
Phone:<br />
</span>
<asp:TextBox ID="TextBox2" runat="server" Font-Names="verdana" Font-Size="X-Small"></asp:TextBox><br />
</span>
</td>
</tr>
<tr style="font-size: 8pt">
<td style="width: 174px; text-align: left">
<span style="font-family: Verdana"><span style="color: #000099">Customer
E-Vault Username:<br />
</span>
<asp:TextBox ID="TextBox3" runat="server" Font-Names="Verdana" Font-Size="X-Small"
Width="150px"></asp:TextBox><br />
</span>
</td>
<td style="width: 187px; text-align: left">
<span style="font-family: Verdana"><span style="color: #000099">Customer
E-Vault Password:<br />
</span>
<asp:TextBox ID="TextBox4" runat="server" Font-Names="Verdana" Font-Size="X-Small"
TextMode="Password" Width="150px"></asp:TextBox><br />
</span>
</td>
<td style="width: 136px; text-align: left">
<span style="font-family: Verdana"><span style="color: #000099">E-Vault
Storage Plan:<br />
</span>
<asp:DropDownList ID="DropDownList2" runat="server" DataValueField="storage_plan"
Font-Names="Verdana" Font-Size="X-Small" ForeColor="Navy">
<asp:ListItem Selected="True">Select Plan.....</asp:ListItem>
<asp:ListItem>0-300MB</asp:ListItem>
<asp:ListItem>300MB-2GB</asp:ListItem>
<asp:ListItem>2GB-4GB</asp:ListItem>
<asp:ListItem>4GB-6GB</asp:ListItem>
<asp:ListItem>6GB-8GB</asp:ListItem>
<asp:ListItem>8GB-15GB</asp:ListItem>
<asp:ListItem>15GB-25GB</asp:ListItem>
<asp:ListItem>25GB-35GB</asp:ListItem>
<asp:ListItem>35GB-50GB</asp:ListItem>
<asp:ListItem>50GB-100GB</asp:ListItem>
<asp:ListItem>100GB-200GB</asp:ListItem>
</asp:DropDownList><br />
</span>
</td>
</tr>
<tr style="font-size: 8pt">
<td style="width: 174px; text-align: left">
<span style="font-family: Verdana"><span style="color: #000099">Analyst:<br />
</span>
<asp:DropDownList ID="DropDownList3" runat="server" DataValueField="cust_analyst"
Font-Names="Verdana" Font-Size="X-Small" ForeColor="Navy" Width="162px">
<asp:ListItem>Select Analyst.....</asp:ListItem>
<asp:ListItem>Brock McFarlane</asp:ListItem>
<asp:ListItem>Cameron Farrally</asp:ListItem>
<asp:ListItem>Chad Huls</asp:ListItem>
<asp:ListItem>Eric Spinney</asp:ListItem>
<asp:ListItem>Greg Freeman</asp:ListItem>
<asp:ListItem>Harald Smit</asp:ListItem>
<asp:ListItem>Kevin Mark</asp:ListItem>
<asp:ListItem>Mark Anderson</asp:ListItem>
<asp:ListItem>Mike Murphy</asp:ListItem>
<asp:ListItem>Tim Elder</asp:ListItem>
</asp:DropDownList><br />
</span>
</td>
<td style="width: 187px; text-align: left">
<span style="font-family: Verdana"><span style="color: #000099">Today's
Date: (mm/dd/yyy)<br />
</span>
<bdp:bdplite id="BDPLite1" runat="server" borderstyle="None" cssclass="bdpLite" dateformat="ShortDate"
font-bold="False" font-names="verdana" font-size="X-Small" forecolor="Navy" selecteddate=""></bdp:bdplite>
</span>
</td>
<td style="width: 136px; text-align: left">
<br />
</td>
</tr>
<tr style="font-size: 8pt">
<td colspan="3">
</td>
</tr>
<tr style="font-size: 8pt">
<td colspan="3" style="text-align: left">
<span style="font-family: Verdana"><span style="color: #000099"><strong>
<br />
Backup Data<br />
<hr style="color: #000099" />
</strong><span>Please enter all directories and/or files and
folders the customer wishes to have backed up. Be thourough yet brief as this is
for historical and record keeping purposes.<br />
<br />
</span></span></span>
</td>
</tr>
<tr style="font-size: 8pt">
<td colspan="3" style="text-align: left">
<asp:TextBox ID="TextBox5" runat="server" ForeColor="#000000" Height="130px" MaxLength="200"
TextMode="MultiLine" Width="503px"></asp:TextBox><br />
</td>
</tr>
<tr style="font-size: 8pt">
<td style="width: 174px">
</td>
<td style="width: 187px">
</td>
<td style="width: 136px">
</td>
</tr>
<tr style="font-size: 8pt">
<td colspan="3" style="text-align: left">
<span style="font-family: Verdana"><span style="color: #000099"><strong>
<br />
BackupExec / NTBackup<br />
<hr style="color: #000099" />
</strong><span>Does the customer have another backup program
running that backs up their files to tape or another physical media.<br />
<br />
</span></span></span>
</td>
</tr>
<tr style="font-size: 8pt">
<td colspan="2" style="height: 41px; text-align: left">
<asp:RadioButtonList ID="RadioButtonList1" runat="server" Font-Names="Verdana" Font-Size="X-Small"
ForeColor="Navy" RepeatDirection="Horizontal" Width="127px">
<asp:ListItem Value="Yes">Yes</asp:ListItem>
<asp:ListItem Value="No">No</asp:ListItem>
</asp:RadioButtonList><span style="font-family: Verdana"><span style="color: #000099">If
"Yes", what program do they use?</span>
<asp:TextBox ID="TextBox6" runat="server" Font-Names="Verdana" Font-Size="X-Small"
Width="200px"></asp:TextBox><br />
</span>
</td>
<td style="width: 136px; height: 41px">
</td>
</tr>
<tr style="font-size: 8pt">
<td style="width: 174px">
</td>
<td style="width: 187px">
</td>
<td style="width: 136px">
</td>
</tr>
<tr style="font-size: 8pt">
<td colspan="3" style="text-align: left">
<span style="color: #000099"><span style="font-family: Verdana"><strong>
<br />
E-Mail Notifications<br />
<hr style="color: #000099" />
</strong><span>Does the customer wish to receive weekly reports
about their backups? (This includes what directories are being backed up, how much
storage space they have used on their plan and how much storage space is remaining).If
so enter their e-mail address below. If they don't want to receive notifications,
you can skip this section.<br />
<br />
</span></span></span>
</td>
</tr>
<tr style="font-size: 8pt">
<td style="width: 174px; text-align: left">
<asp:TextBox ID="TextBox7" runat="server" Font-Names="Verdana" Font-Size="XX-Small"
ForeColor="Navy" Width="201px"> N/A</asp:TextBox></td>
<td style="width: 187px">
</td>
<td style="width: 136px">
</td>
</tr>
<tr style="font-size: 8pt">
<td style="width: 174px">
</td>
<td style="width: 187px">
</td>
<td style="width: 136px">
</td>
</tr>
<tr style="font-size: 8pt">
<td style="width: 174px; height: 26px">
</td>
<td style="width: 187px; height: 26px; text-align: left">
<asp:Button ID="Button2" runat="server" BackColor="White" BorderColor="Navy" BorderStyle="Solid"
BorderWidth="1px" Font-Names="verdana" Font-Size="Small" OnClick="InsertData" Text="Submit Form" /></td>
<td style="width: 136px; height: 26px">
</td>
</tr>
</table>
&nbsp;&nbsp;</div>
<div style="text-align: center">
<img src="/images/div.jpg" /><br />
<br />
<span style="font-size: 7pt; font-family: Verdana">Copyright 2006 Weston Technology
Solutions </span>
</div>

</div>
</form>
</body>
</html>

View 3 Replies View Related

Form Based Authentication + Webform Report Viewer Control

Nov 19, 2007



Hi,
I would like to know how to call a report from a report viewer control in a web application. The reporting services is forms authenticated. I've done this authentication using the sample solution given by microsoft (adding custom security extension). Now am able to view the reports from Report manager and Report server URL. But i dont know how to authenticate the user from my web application and pass the credentials to the report server to view the report in report viewer control. Can somebody help in this? its bit urgent. Thanks in advance

View 1 Replies View Related

Form Criteria Based On An Entered Date And Date Today

Mar 16, 2007

Hi

I am very new to SQL so please excuse me if my question seems too easy to answer.

Basically I need to populate a form based with records based on the criteria that the next mot date and todays are +/- 10 days.

i.e if todays date is 13/05/07 and the next mot date is 3/05/07 or later OR 23/05/07 or less then various fields will be shown in the form.

Can you please help.

Thanks
Paul

View 2 Replies View Related

ReportViewer Control Doesnt Show 100% Of Report When Included In .Net Web Form With Other Controls

Apr 17, 2008



I created some controls for filtering the report that will be displayed on the same page, but below these controls. The controls take about 200px of the top of the form, while the report will be displayed in the rest of the page.

I'm using the ReportViewer control in Async mode, so it's being rendered as an Iframe, and this is necessary because some reports will take up to a couple minutes, so I want the loading animation.

As many of you know, this type of scenario will cause two scrollbars to be shown on this Web form: one for the main form, and the other for the Iframe containing the report. To prevent this, I have html,body set to overflow:hidden. This works great at preventing the outer scrollbar from showing, and only the report has a scrollbar.

The problem is that the bottom 200px (see first paragraph above) of the report doesnt show and cant be scrolled to. Has anyone come across a solution for this situation?

I'm basically stuck either having a report with two side by side scrollbars, or a report with 1 scrollbar that cuts off the last portion of each page of a report.

View 1 Replies View Related

Simple Function For Returning A Character Based On Search Criteria..

Feb 20, 2007

Hi,how do I do a simple formula, which will search a field for specialcharacters and return a value.If it finds "%" - it returns 1elseIf it finds "?" it returns 2endIf this is the incorrect newsgroups, please direct me to the correct oneregards Jorgen

View 2 Replies View Related

Transact SQL :: Function To Return Unit Price Based On Various Criteria

Apr 30, 2015

We were asked to create an SQL function to return a unit price based on various criteria. The function works fine except for the tiered pricing (use of BillingPriceTable) calculation.  What we need to do is break up the total quantity passed to the function and return the total of prices found.  In our example, we passed a quantity of 9,721 units and need to return a total price of 231.92 using the table below.

Low Qty    High Qty    Fee        Actual Qty        Price
0                  7500        0.025            7500           187.50
7501           15000        0.020            2221          44.42

Below is the table definition that we have to work with (ugghh).

CREATE TABLE [dbo].[BillingPriceTable](
[PriceTableID] [int] IDENTITY(1,1) NOT NULL,
[entity] [varchar](4) NULL,
[PriceTableCode] [varchar](10) NULL,
[PriceTableName] [varchar](40) NULL,

[Code] ....

What we have so far is shown below.  The columns that start with bdxx are the "High Qty" values and the columns that start with prxx are the price for that quantity range.  So, the current SELECT is shown below and it returns the price based on the entire qty of 9,721 and returns a unit price of 0.020 and should return 0.023857628

The current SELECT is shown below and is returning 0.020 which is the fee for the total rather than calculating the fee twice, once for the 0-7500 and again for the 7501-15000 (actually 7501-9721). Two things came to mind, one was a WHILE loop and the other was possibly a ranking function of some sort. 

ALTER FUNCTION [dbo].[fn_GetPrice]
(
@plincdvarchar(3),
@pgrpcodevarchar(4),
@pitmcodevarchar(4),
@qtydecimal(10,1) = 1,
@corpnbrvarchar(9)
)

[Code] ....

View 9 Replies View Related

Access Query Against SQL Server Works Only Without Criteria

Jun 23, 2006

Getting a weird error while trying out a query from Access 2003 on aSQL Server 2005 table.Want to compute the amount of leave taken by an emp during the year.Since an emp might be off for half a day (forenoon or afternoon), havethe following computed field:SessionOff: ([ForenoonFlag] And [AfternoonFlag])The query works fine when there's no criterion on SessionOff.However, when I try to get the records where the SessionOff equals 0, Iget the following error:~~~~~ODBC--call failed. [Microsoft][SQL Native Client][SQL server]Incorrect syntax near the keyword 'NOT'. (#156)~~~~~I checked the SQL of the Access query, but there's no NOT anywhere init:~~~~~SELECT tblWorkDateAttendance.*FROM tblWorkDate INNER JOIN tblWorkDateAttendance ONtblWorkDate.WorkDate = tblWorkDateAttendance.WorkDateWHERE (((([ForenoonFlag] And [AfternoonFlag]))=0) AND((tblWorkDateAttendance.WorkDate)<Date()) AND((Year([tblWorkDate].[WorkDate]))=Year(Date())) AND((Weekday([tblWorkDate].[WorkDate])) Between 2 And 6) AND((tblWorkDate.HolidayFlag)=False));~~~~~What gives?

View 4 Replies View Related

SQL ACCESS Vias Web Form

Dec 12, 2004

Hello, I'm having a problem connection to an Eval version of SQL Server 2000. I'm pretty sure the problem is not due to Eval version since...well, I need to evaluate the server if I intended to purchase it right? anyhow. I've loaded a copy of SQL server 2000 on my local machine. I only have one machine which I use for development and housing SQL Server.

I tried to set SQL up real "vanilla" and elected to use only Windows Authentication, this bypassing any userdefined passwords for the sa login.

Now...I've written a real basic Stored Procedure to test the connection and verify proper data transfer from the .aspx page. here's the SP SQL code and the .vb code behind page as well as the error I get. Note. I also tried Query Analyzer and was getting an error there as well indicating the SP could not be found...hmmm..

stored procedure:

CREATE PROCEDURE [dbo].[NewMemberInsert]

@UserNamevarchar(100),
@UserPassvarchar(10)

AS

INSERT INTO EEMemberList ( UserName, UserPass )
VALUES ( @UserName, @UserPass)
GO

.vb code behind

Imports System
Imports System.Data
Imports System.Data.SqlClient


Public Class WebForm1
Inherits System.Web.UI.Page
Protected WithEvents lblUserName As System.Web.UI.WebControls.Label
Protected WithEvents lblUserPass As System.Web.UI.WebControls.Label
Protected WithEvents txtUserName As System.Web.UI.WebControls.TextBox
Protected WithEvents btnSubmit As System.Web.UI.WebControls.Button
Protected WithEvents frmMyForm As System.Web.UI.HtmlControls.HtmlForm
Protected WithEvents SqlConnection1 As System.Data.SqlClient.SqlConnection
Protected WithEvents sqlCmd As System.Data.SqlClient.SqlCommand
Protected WithEvents txtUserPass As System.Web.UI.WebControls.TextBox

#Region " Web Form Designer Generated Code "

'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.SqlConnection1 = New System.Data.SqlClient.SqlConnection()
Me.sqlCmd = New System.Data.SqlClient.SqlCommand()
'
'SqlConnection1
'
Me.SqlConnection1.ConnectionString = "data source=THIRDEYE;initial catalog=SQCTEST;integrated security=SSPI;persist sec" & _
"urity info=False;workstation id=THIRDEYE;packet size=4096"
'
'sqlCmd
'
End Sub

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub

#End Region

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
End Sub

Private Sub btnSubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSubmit.Click

sqlCmd.CommandText = "dbo.[NewMemberInsert]"
sqlCmd.CommandType = System.Data.CommandType.StoredProcedure
sqlCmd.Connection = SqlConnection1
sqlCmd.Parameters.Add(New System.Data.SqlClient.SqlParameter("@RETURN_VALUE", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.ReturnValue, False, CType(10, Byte), CType(0, Byte), "", System.Data.DataRowVersion.Current, Nothing))
sqlCmd.Parameters.Add(New System.Data.SqlClient.SqlParameter("@UserName", System.Data.SqlDbType.VarChar, 100))
sqlCmd.Parameters.Add(New System.Data.SqlClient.SqlParameter("@UserPass", System.Data.SqlDbType.VarChar, 10))
sqlCmd.Parameters("@UserName").Value = txtUserName.Text
sqlCmd.Parameters("@UserPass").Value = txtUserPass.Text

sqlCmd.Connection.Open()


End Sub
End Class

Now...the error

Server Error in '/EEscape' Application.
--------------------------------------------------------------------------------

Login failed for user 'THIRDEYEASPNET'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'THIRDEYEASPNET'.

Source Error:


Line 54: sqlCmd.Parameters("@UserPass").Value = txtUserPass.Text
Line 55:
Line 56: sqlCmd.Connection.Open()
Line 57:
Line 58:


Source File: C:InetpubwwwrootEEscapelogin.aspx.vb Line: 56

Stack Trace:


[SqlException: Login failed for user 'THIRDEYEASPNET'.]
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction)
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction)
System.Data.SqlClient.SqlConnection.Open()
EEscape.WebForm1.btnSubmit_Click(Object sender, EventArgs e) in C:InetpubwwwrootEEscapelogin.aspx.vb:56
System.Web.UI.WebControls.Button.OnClick(EventArgs e)
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
System.Web.UI.Page.ProcessRequestMain()




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573

View 2 Replies View Related

Passing Value From A Access Form To A Query

Jun 23, 2006

Frustration has gotten the best of me on this one. Can anyone help?
I need to pass the current value in an Access Data Project (back-end is MS SQL) text field to the where condition in an SQL using VBA. This is what I have, but does not work.

Private Sub Command44_Click()
Me.SS.SetFocus
Dim strSQL As String
Dim strSSecurity As String
strSSecurity = Me.SS
strSQL = "Update Employees Set employees.PositionID = '',employees.jobcode = '' Where employees.ss = strSSecurity"
DoCmd.RunSQL strSQL
End Sub

It is supposed to take the current Social Security number from the form and match it against the employees table. Once it finds the matching record it should update the PositionID and JobCode fields to '' (empty string)
But it doesn't
Anyone with any ideas?
Thanks
Dan

View 2 Replies View Related

Linking Form In MS Access To Oracle

May 9, 2008

hello

we suppose to link the form in MS Access with Oracle

can anyone tell me how to write the code for these buttons

i tried to write as I learned in VB.NET,
But it seems doesn't work :(

http://www3.speedyshare.com/data/191404757/10803567/78224332/db2.jpg

View 2 Replies View Related

SQL Server Login Form For Access

Jul 20, 2005

Hi there...I use SQL server integrated security so when a user opens a database inaccess it prompts the username & password in a small popup box onconnection, but I'd like to use my own customised form for theauthentication process, is this possible? I do know that this login popboxis displayed before any forms are loaded, can it be said that on databaseconenct that the form is opened? How will I transfer the values entered intothe login form to the sql server for authentication?Thanks alot in advanceRudi Groenewald

View 3 Replies View Related

Import Form Access And Transactions

Oct 1, 2007

I'm trying to import data from Access table using DataFlow with TransactionOptions- Required.
I just want to "remove" (rollback) all records which my SSIS Dataflow inserts into SQL Server.
First I tried to use normal Jet 4.0 provider - but it causes strange error.
Then I tried to use .NET Jet 4.0 provider - it produces this error :






Code Block

[DataReader Source [540]] Error: System.InvalidOperationException: The ITransactionLocal interface is not supported by the 'Microsoft.Jet.OLEDB.4.0' provider. Local transactions are unavailable with the current provider. at System.Data.OleDb.OleDbConnectionInternal.EnlistTransactionInternal(Transaction transaction, Boolean forcedAutomatic) at System.Data.OleDb.OleDbConnectionInternal.EnlistTransaction(Transaction transaction) at System.Data.OleDb.OleDbConnection.EnlistTransaction(Transaction transaction) at Microsoft.SqlServer.Dts.Runtime.ManagedHelper.GetManagedConnection(String assemblyQualifiedName, String connStr, Object transaction) at Microsoft.SqlServer.Dts.Runtime.Wrapper.IDTSConnectionManager90.AcquireConnection(Object pTransaction) at Microsoft.SqlServer.Dts.Pipeline.DataReaderSourceAdapter.AcquireConnections(Object transaction) at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostAcquireConnections(IDTSManagedComponentWrapper90 wrapper, Object transaction)
Any ideas how to do this? I really need transactions in my solution. With Excel file it works fine.
Thanks for help.

View 1 Replies View Related

Fails When Use MS Access Datasourse And Ran Form SQL Job (Fine In IDE)

Dec 19, 2007

Hi,

I have created a relatively simple SISS package for MS SQL server 2005 SP1, the package runs without issue when started from the development environment, but fails when ran via a SQL Job.


I have other SISS jobs which run without any problems, the difference with this one is that it doesn€™t just access data the the MS SQL server databases, but it also accesses an external MS Access 2003 database (emptys tables then repopulates based on data in MS SQL)

The database is held on a network share, so I would imagine the issue is that the SQL job is ran under a different security context. Originally it was ran under €œSERVERNAMESYSTEM€?, but I created a new credential on the server giving it my own username and password, I then added a proxy to the server which used the new credietial and was given access to all sub systems.


The SQL job step was setup to run under this proxy, but still failed even though the user name on the credentials had access to the MS Access database on the network share & also matched the package CreatureName, allowing the data to be read as EncryptSensitiveWithUserKey was set in the package.


The SISS package was created by using the wizard, no ODBC connection was setup on the server.
The job history shows €œExecuted as user: ADMINusername. The package execution failed. The step failed.€?
I have also tried this with a protection level of ServerStorage



Any sugestions?

View 4 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 Access Static Global Variables In WPF Form

Dec 5, 2007



Hi,

can i keep my global variables in app.xaml.cs file.

if yes then how will i access those variables in MyFirstApp.xaml.cs file??

if no then what is other alternate to create global variables so that it can be access through out the project??

thanx alot
Mohan

View 4 Replies View Related

Passing Date Fields From Form To Access ADP Views

Jul 20, 2005

I have a whole bunch of forms that have an unbound StartDate and anEndDate field that I have used in MSAccess MDB databases as parametersin queries (ie tblEvent.StartDate > Forms!myFormName.StartDate.)So, now I'm migrating this beast over to and ADP/SQL Server projectusing Views and Procedures.How do I pass the value in Forms!myFormName.StartDate to a Procedureand get something that looks like:If tblEvent.StartDate > Forms!myFormName.StartDate then ...Any help is GREATLY appreciated. This is a major problem before I canmove ahead with this beast!lq

View 1 Replies View Related

Filter Records In Access 2003 Project Form

Mar 6, 2008

I am trying to filter the records in an Access2003 project form using data from a control in a different form. I define the variable in form1 as RegKeyWord. The record source for form2 ends with WHERE CustomerName Like RegKeyWord. I receive the error Invalid column 'RegKeyWord'
Can anyone help?

View 1 Replies View Related

Can Create Access Form Layout Based On Table From Sql?

Sep 25, 2006

Hi,

Can this be done? Please advise. Thanks.Is there any template available in sql for creating forms?

View 1 Replies View Related

Import Data Form Access To Sql Server 2005

Feb 20, 2007

I have a database in ACCESS and i want everytime that there is a change made in Access the cude in SQL server to be automatically updated .Is there a way that this can be done with Integration Services?

View 1 Replies View Related

Help Convert MS Access Function To MS SQL User Defined Function

Aug 1, 2005

I have this function in access I need to be able to use in ms sql.  Having problems trying to get it to work.  The function gets rid of the leading zeros if the field being past dosn't have any non number characters.For example:TrimZero("000000001023") > "1023"TrimZero("E1025") > "E1025"TrimZero("000000021021") > "21021"TrimZero("R5545") > "R5545"Here is the function that works in access:Public Function TrimZero(strField As Variant) As String   Dim strReturn As String   If IsNull(strField) = True Then      strReturn = ""   Else      strReturn = strField      Do While Left(strReturn, 1) = "0"         strReturn = Mid(strReturn, 2)      Loop   End If  TrimZero = strReturnEnd Function

View 3 Replies View Related

Best Practice Question: JOIN Criteria Vs. WHERE Criteria

May 24, 2004

For example, consider the following queries:


DECLARE @SomeParam INT
SET @SomeParam = 44

SELECT *
FROM TableA A
JOIN TableB B ON A.PrimaryKeyID = B.ForeignKeyID
WHERE B.SomeParamColumn = @SomeParam

SELECT *
FROM TableA A
JOIN TableB B ON A.PrimaryKeyID = B.ForeignKeyID AND B.SomeParamColumn = @SomeParam


Both of these queries return the same result set, but the first query filters the results in the WHERE clause whereas the the second query filters the results in the JOIN criteria. Once upon a time a DBA told me that I should always use the syntax of the first query (WHERE clause). Is there any truth to this, and if so, why?

Thanks.

View 3 Replies View Related

How To Make Form To Delete Record From Table In Access 2002

Jun 29, 2004

I like to give First Name and Last Name in two different text box and then hit the delete button (command button). Then it will do a query to find the person and delete the corresponding record from the table. Any kind of help will be appreciated. Thank you.

View 1 Replies View Related

MS Access Front End To SQL Server Problem Passing Form Value To Report

Jul 23, 2005

I just changed my Access 2002 database to a SQL Server ADP project. Ihad a form where the user entered a value into a text box and when acommand button on the form was clicked a Report was opened. The reportsrecord source is a query. The query uses the value from the form textbox to restrict the query.Table name = EggsTableone of the columns in the table is named: EggColorForm name = EggColorFormForm text box name = ColorTextBoxThis sql worked for the query before I converted to SQL:SELECT EggsTable.EggColorFROM EggsTableWHERE (((EggsTable.EggColor)=[Forms]![EggColorForm]![ColorTextBox]));This no longer works. Can I change the syntax somehow to get this towork? I tried dropping the brackets around the word "Forms", I trieddropping all the square brackets, etc., nothing worked.I also tried just opening the report with the report's Server Filterproperty set to:EggColor=N'Forms.EggColorForm.ColorTextBox'I tried using the Report's open event to pass the form value directlyto the report. I tried setting a variable from the text box value onthe form. So far, nothing works. Any ideas?

View 7 Replies View Related

DTS Access Control

Mar 2, 2006

Is there any access control available for the DTS package? I want to create an a/c that can create/modify but cannot delete DTS. Is there any way I can do that?

View 2 Replies View Related

Programatically Control Show/hide Parameters (chevron Symbol Function)

Jan 4, 2008

I'd like the state of the function bars to stay at whatever it was as the user moves from one report to the next rather than opening to full each time a new report is opened. Can this be done through a setting or programatically at teh report level? Is there a <default_toolbars_OpenState> tag or something?

Thanks in advance.

View 4 Replies View Related

Can't Access The Datasource Control

May 21, 2006

When I put a sqldatasource in my page and want to configure it and add a new connection to it I recieve this error : "object reference not set to an instance of an object" . Do you have any idea about solving this problem. please help me Thanks

View 5 Replies View Related

Drill Down Access Control In SSRS

May 6, 2008

HI,

i would like to know whether you can control access to a drill down in a report in ssrs.
thanks for your help in advance.

thank you
Kanthi

View 3 Replies View Related

Remote Access Control Manager

Mar 15, 2008

View 4 Replies View Related

User Control Data Access Error

Mar 3, 2008

When creating a user control (ascx) and registering it in the webpage, an error occurred:
"Login failed for user ''. The user is not associated with a trusted SQL Server connection."
This error does not appear when creating data access normally, and I don't use username/password for the northwind database; any suggestions.

View 5 Replies View Related

Can We Access Reporting Server By URL In The Enviornment Of Domain Control?

Dec 1, 2007



If the net is domain control.

Can we use reporting server as usual?

Or need some special setting about it for protect it working well?

Thanks

View 1 Replies View Related







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