Setting Up Input Form
Oct 24, 2012
The Server / DB that I am trying to connect to is local.Everything is in place, except I do not know what to put in the "data_source" and "Server.MapPath" fields in the 'form_ac.asp' file.It seems like no matter what I put in there (I have tried several different connection strings), that I always get a '500 Internal Server' error as soon as I 'submit' the form. Its like something else is out of place, because it doesn't even seem to check the DB strings (just based on how quickly the 500 error shows up)
You can see the 'test' form I am working with here: URL...And here is the file the form posts to (form_ac.asp):
Code:
<%
' Declaring variables
Dim first, last, account, email, state, comments, data_source, con, sql_insert
' A Function to check if some field entered by user is empty
Function ChkString(string)
ChkString = Replace( Trim(string) , "'", "''")
End Function
[code]....
The bold is where I am having issues. No matter what connection string I try, I keep getting the 500 error in my browser.I have created the Database in SQL Server Management Studio, and created the table.
View 2 Replies
ADVERTISEMENT
Feb 19, 2007
Hi,
I'm pretty new to ASP.NET and VB, but I'm working on a project which is essentially a staff directory. Using VS 2005, I've setup a basic grid view which connects to an object which connects via a data layer to a SQL database with Name, Surname, Email, Extension No and Department fields.
I have it working so that if a user enters a name and surname for example, it will return all records with either the name matching or surname matching input parameters. What I want to do is to set up a SQL query which is:
SELECT * FROM records WHERE (Name LIKE @Name) AND (Surname LIKE @Surname) AND (Email LIKE @Email) AND (Dept LIKE @Dept)
so that if the user only enters the first name and surname for example as above, it ONLY returns the record which matches the first name and surname and not all records with either/or. One way I've thought of to do this is to convert the empty fields to "Nothing" so that it fullfils the search parameter for the empty fields. If someone can explain how to do this, or can suggest a better way, I'd be grateful.
Cheers,
Tom
View 3 Replies
View Related
Dec 7, 2005
Can some one give me an over view of what I need to do:
Lets say I have a web form with the field: Arrival Date
A web user enters an arrival date of 2/10/06
How do I do a stored procedure that accepts that arrival date and lets me know (by an alert or email) 24 hrs in advance of the arrival date?
View 2 Replies
View Related
Jul 13, 2007
Im trying to determine the best way to store data gathered from a form that a user will fill out online. The form is dynamic and is customized at run time based on group-specific criteria. The end result is a form that might have 3 extra text boxes, 2 extra sets of radio buttons and a freeform textbox, whereas for another group, there might be a slightly different set of input fields. Now comes the issue of storing this data. Since the fields can be somewhat dynamic, it could get tricky to define table columns for each possible input field. So Im considering storing the data as xml. Has anyone else had to build custom forms and ended up storing the data as xml ?
View 2 Replies
View Related
Jul 16, 2007
Dear all,
To allow users enter chinese character into table, I did try to change the field type to nchar and this is workable. But I have few hundred tables.. Is there anyway to change the setting in easier way? by instead change the field type one by one for each table?
I tried change the collation to Chinese_PRC_90_BIN for the database, but it is not support chinese input..
Any Idea?
Thanks.
View 4 Replies
View Related
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
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
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
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
Jul 11, 2007
I am trying to add records to SQL database, thru <form> </form> on click of button, The system is working fine, Databse table is getting updated correctly.
But screen displays the same form again while i want it to open another asp.net page i.e. buy.aspx and also generate an e-mail automatically.
I m stuck. Please help.
pcg
Relevent code of mine is as below.
<script runat="server">
void addtosalelist(Object sender, EventArgs e) { .... .... dbConnection.Open(); .... .... dbConnection.Close(); }
<form action="buy.aspx" method="post" runat="server">.........<asp:Button id="button1" onclick="addtosalelist" runat="server" Text="Submit"></asp:Button> </form>
View 5 Replies
View Related
Mar 2, 2006
Hi all, this'll be my first post here, hopefully I'll get this right and someone can help.
I'm trying to generate a subquery that will take a set of one-column rows and concatenate them into a single cell.
I've adapted from this article (http://www.sqlteam.com/item.asp?ItemID=2368) the following code:
DECLARE @topicList varchar(200)
SELECT @topicList = COALESCE(@topicList + ', ', '') + MAB_topics.topic_name
FROM MAB_topics
SELECT @topicList
that produces a list of all the topic_names in the database seperated by commas. That's fine.
I couldn't follow all the code in this thread (http://www.sqlteam.com/Forums/topic.asp?TOPIC_ID=18363) but I was able to extract and modify this code:
DECLARE @topicList varchar(200)
SELECT MAB_topics.topic_name
INTO #tmp
FROM MAB_topics, MAB_articleIndex
WHERE MAB_articleIndex.article_ID = 76 AND
MAB_topics.topic_ID = MAB_articleIndex.topic_ID
SELECT * FROM #tmp
drop table #tmp
which returns the two topic_names that I'd expect. (Note: this is my very first day declaring variables and using temp tables.) So I keep thinking that the following code would combine the two above working functions. But, when I run it in Query Analyzer, it just returns "(2 row(s) affected)" instead of a recordset.
DECLARE @topicList varchar(200)
SELECT MAB_topics.topic_name
INTO #tmp
FROM MAB_topics, MAB_articleIndex
WHERE MAB_articleIndex.article_ID = 76 AND
MAB_topics.topic_ID = MAB_articleIndex.topic_ID
SELECT @topicList = COALESCE(@topicList + ', ', '') + #tmp.topic_name
FROM #tmp
drop table #tmp
What am I doing wrong? I'm sure it's something simple but I've been reading and trying and reading and trying for a few hours and haven't gotten it yet. The ideal response would figure out what I'm trying to do as well as what my mistake is and explain how I'm misthinking. A close second would be just fixing my code. :)
Thanks in advance,
Chris
View 6 Replies
View Related
Feb 19, 2008
HiI am using Visual Web Developer 2005 Express and SQL Server Express 2005.From Northwind I can display data to Gridview.Could someone point me in the right direction on two points.How do I start a new database (.mdf) - I cannot find this option.I can change Northwind around - but I want to start my own database.
Once I have that sorted - how can I "insert" data into database using a dropdown box?A "dropdown" box such as you would find online.
Thanks in advance.Stephen
View 2 Replies
View Related
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
Jun 25, 2005
HI I just signed up this forum,I wanted some help.How can i add sql clock on VB Form.
Arshad
View 2 Replies
View Related
Jun 10, 2004
Can anyone help me with this problem? I have a form with three drop down lists. From these lists, the user selects an accountID, the territory that ID is from, and the territory that ID is transfering to. Upon submission, that account number is inserted into the table, along with the TerritoryID, RegionID, DivisionID, and EmpID associated with both of the territories selected. However, upon running this, the accountID and ToTerritory info are inserted once, but the FromTerritory data is inserted tens of thousands of times. Although they are not entered into the same record, which i eventually want to happen, i do want to figure out why so many duplicate entries for the FromTerritory are entered. Here is my code and the stored procedure to enter the FromTerritory. I would appreciate any help.
-------------------------
Sub InsertData()
Dim sql as string
dim sql1 = "insertaccounttransfermike 'AccountID''" & AccNumber.SelectedItem.Value & "'"
dim sql2 = "insertaccounttransfermikefrom 'FromTerritory''" & FromName.SelectedItem.Value & "'"
dim sql3 = "insertaccounttransfermiketo 'ToTerritory''" & ToName.SelectedItem.Value & "'"
' Create Connection Object, Command Object, Connect to the database
Dim conn as New SQLConnection(connstr)
Dim cmd1 as New SQLCommand(sql1,conn)
Dim cmd2 as New SQLCommand(sql2,conn)
Dim cmd3 as New SQLCommand(sql3,conn)
conn.open()
cmd1.ExecuteNonQuery()
cmd2.ExecuteNonQuery()
cmd3.ExecuteNonQuery()
conn.Close()
' go to the datagrid query page
Response.redirect(return_page)
end sub
--------------------------
CREATE PROCEDURE InsertAccountTransferMikefrom
@FromTerritory nvarchar(50)
AS
Insert INTO AccountTransfersTestMike
(FromTerritoryID, FromRegionID, FromDivisionID, FromEmpID)
SELECT Territories.TerritoryID, Regions.RegionID, Divisions.DivisionID, Employees.EmployeeID
FROM EndoscopySqlUser.Territories INNER JOIN
EndoscopySqlUser.Regions ON EndoscopySqlUser.Territories.RegionName = EndoscopySqlUser.Regions.Region INNER JOIN
EndoscopySqlUser.Employees ON EndoscopySqlUser.Territories.TerritoryID = EndoscopySqlUser.Employees.TerritoryID INNER JOIN
EndoscopySqlUser.Divisions ON EndoscopySqlUser.Regions.Division = EndoscopySqlUser.Divisions.DivisionID, accounts
WHERE ( (EndoscopySqlUser.Employees.DateLeft IS NULL) AND (EndoscopySqlUser.Territories.TerritoryName=@FromT erritory))
GO
View 1 Replies
View Related
Jul 24, 2004
i am using this statement
select dateadd(dd,1,20010331)
and it's throwing an error
Arithmetic overflow error converting expression to data type datetime.
what's wrong?
View 2 Replies
View Related
Jan 27, 2004
I'm running SQL Server 2000. I have an interesting form I am creating for a client which has on it literally 20,500 fields that need to be stored in the system which I then have to create reports off of for statistics and trends.
I'm not sure how I should go about storing that large amount of information in SQL Server with the limitations of the size of a table. Would it be best to create 20 some tables to store it, or is there a better fashion to store it. 90% of the fields are numbers ranging from 0 to 100.
Thanks for any suggestions you can come up with!
View 14 Replies
View Related
Apr 5, 2008
I have two tables. The table is below.
Table name 1 : Income
Income RentMonth
1500 Jan
1500 Feb
1500 Apr
Table name 2 : Expense
Expense ExpMonth
200 Jan
300 Mar
400 Apr
The result table becomes (Profit=Income-Expense)
Profit Month
1300 Jan
1500 Feb
-300 Mar
1100 Apr
But I form the query by join the both Income and Expense tables to subtract the Income and Expense month wise.
But one moth is in one table the same month is not in another table.
For Example Feb month is in Income table, but not in Expense table.And Mar month is in Expense table and not in Income table. So how will I form the query to achieve my result table as i indicated above. Kindly help me.
Kamal.
View 2 Replies
View Related
Apr 25, 2008
I'm using SQL server on godaddy.com, and for the life of me, tried all freakin day yesterday to get a form to send data to my table, and can't get it to work for the life of me
I think the asp form sends the information to the asp page that is to add the information to the tables correctly, but am not entirely sure, so here is the code for the form:
<html>
<head>
<title>Form Entry</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body><form method="post" action="add.asp">
<table>
<tr>
<td>CustomerID:</td>
<td><input name="CustID"></td>
</tr><tr>
<td>Company Name:</td>
<td><input name="Company"></td>
</tr><tr>
<td>Contact Name:</td>
<td><input name="Contact"></td>
</tr><tr>
<td>Address1:</td>
<td><input name="Address1"></td>
</tr><tr>
<td>Address2:</td>
<td><input name="Address2"></td>
</tr><tr>
<td>Address3:</td>
<td><input name="Address3"></td>
</tr><tr>
<td>City:</td>
<td><input name="City"></td>
</tr><tr>
<td>State:</td>
<td><input name="State"></td>
</tr><tr>
<td>Zip:</td>
<td><input name="Zip"></td>
</tr>
<td>Email:</td>
<td><input name="Email"></td>
</tr><tr>
<td>Phone:</td>
<td><input name="Phone"></td>
</tr>
</table>
<br /><br />
<input type="submit" value="Add New">
<input type="reset" value="Cancel">
</form>
</body>
</html>
Now for the page that is giving me the problem (I think). I'm pretty sure I'm fudging up the connectivity somewhere because all I get is an http 500 error every time I try to upload the information.
Why won't it bloody connect?!?!
Also, is the DIM function on this page used to hide important information? If you guys can help me fix this, I'd be incredibly, incredibly greatful, I'm frustrated out of my mind!
<%@LANGUAGE="JAVASCRIPT" CODEPAGE="CP_ACP"%>
<html>
<head>
<title>piece of shit page</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<%
Dim oConn, oRs
Dim qry, connectstr
Dim db_name, db_username, db_userpassword
Dim db_server
db_server = "whsql-v22.prod.mesa1.secureserver.net"
db_name = "Fulfillment"
db_username = "Fulfillment"
db_userpassword = "your_password"
tablename = "KSEP_Customers"
connectstr = "Driver={SQL Server};SERVER=" & db_server & ";DATABASE=" & db_name & ";UID=" & db_username & ";PWD=" & db_userpassword
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "c:/webdata/northwind.mdb"sql="INSERT INTO customers (CustID,companyname,"
sql=sql & "contactname,address,city,postalcode,country)"
sql=sql & " VALUES "
sql=sql & "('" & Request.Form("CustID") & "',"
sql=sql & "'" & Request.Form("Company") & "',"
sql=sql & "'" & Request.Form("Contact") & "',"
sql=sql & "'" & Request.Form("Address1") & "',"
sql=sql & "'" & Request.Form("Address2") & "',"
sql=sql & "'" & Request.Form("Address3") & "',"
sql=sql & "'" & Request.Form("City") & "',"
sql=sql & "'" & Request.Form("State") & "',"
sql=sql & "'" & Request.Form("Zip") & "',"
sql=sql & "'" & Request.Form("Email") & "',"
sql=sql & "'" & Request.Form("Phone") & "')"on error resume next
conn.Execute sql,recaffected
if err<>0 then
Response.Write("No update permissions!")
else
Response.Write("<h3>" & recaffected & " record added</h3>")
end if
conn.close
%>
</body>
</html>
View 4 Replies
View Related
Jun 8, 2006
I have a Visual Basic application that connects to a SQL server database. In my application, I have a login screen that is supposed to pause the application (it's coded as modal) and ask the user for a login and password. I have my connection string and user set up to use Windows NT authentication.
However, what is happening with my application is that as soon as I start the program, it never stops at the login screen, but instead goes right into the application.
Is this "normal" when using Windows NT authentication? What causes this behavior? How can I make my program stop at the login screen, and more interestingly, would I want to stop at a login screen?
Thanks in advance to all who reply. This is driving my crazy!
This forum is best viewed with a computer. Questions asked freely. Confusion happily shared.
View 2 Replies
View Related
Oct 10, 2006
Vuyo writes "how do you output values from the database to a form(.NET Platform)?"
View 2 Replies
View Related
Jan 14, 2007
I have a table SIM_Temp where I ahve three fields val1,val2,val3. I have some data like
SIM_Temp
--------
Val1----------Val2-------------Val3
===================================
AIRMECH------172371.13---------2004
AIRMECH------4269.5------------2003
ETA----------2871704.6724------2005
ETA----------6244149.0769------2004
ETA----------9046873.6504------2003
What I want is, I want this to be read like
CustomerName 2003------------2004----------2005
AIRMECH------------4269.5---------172371.13-----Nil
ETA--------------9046873.6504-----6244149.0769--9046873.6504
Please advice me, how could I do this.
Thank you
Ceema
View 7 Replies
View Related
Jan 17, 2007
I have a table SIM_TempCustomer where I have 5 fileds nad Values Like
SIM_TempCustomer
----------------
Val1.........Val2.........Val3.........Val4.........Val5
---------------------------------------------------------
A.............NUll........1.............Null.........3
B.............Null........Null..........Null.........2
C.............Null........6.............12...........Null
What I want i, if there is any value in any fields, other null values
in the field should be replaced by 0, if all the rows of the filed
are null, simply leave as it is....
Like the select statement of this SIM_TempCustomer should give a result like
Val1.........Val2.........Val3.........Val4.........Val5
---------------------------------------------------------
A.............NUll........1.............0............3
B.............Null........0.............0............2
C.............Null........6.............12...........0
Could any one help me.
Thanks
Ceema
View 1 Replies
View Related
Dec 29, 2005
I'm trying to create a online update form to a SQL table. I've neverdone this function before, and I'm not quite sure I have the codingcorrect. Below is the coding for the Update statement.final String udc = "UPDATE INTO " + "Comm_WebSubmission Set ProjectID= request.getParameter("ProjectID")(Assigned,DateAssigned,Status,StatusDescription,Re solution,CompletionDate)values(?,?,?,?,?,?)";Any help you can give me would be greatly appreciated.Cat
View 1 Replies
View Related
Nov 27, 2006
Hello, I have following Situation:I have a Dimension "SourceDirectory", whis has Elements"SourceDirectory1", "SourceDirectory2", ... until "SourceDirectory10".My Statement in MDX is whis:SELECT {[Measures].AllMembers} ON columns,{[SourceDirectory].Children} ON rowsFROM [CheckstyleError]It works. Now, how can I select all SourceDirectories but not the"SourceDirectory6", whis has only NULL-Values and I need't to see it inmy report.I would be glad to have an early reply!Thanks
View 1 Replies
View Related
Jul 20, 2005
Hi there...How do I get to extract info like, current Database logged in user orgeneral stats like, ram usage... etc etc etc into a form if I use MicrosoftAccess 2002 for my forms application?Thanks in advanceRudi
View 1 Replies
View Related
Apr 16, 2008
Could you please help me to get the expected out put .
here is the sample
Create Table Inventory
(
Item Varchar(10),
Color Varchar(10),
Quantity int
)
Insert Into Inventory Values('Table','Blue',124)
Insert Into Inventory Values
('Table','Red',223)
Insert Into Inventory Values ('Chair','Blue',101)
Insert Into Inventory Values ('Chair','Red',210)
Insert Into Inventory Values ('Chair','Red',230)
Expected output
Blue red
table 1 1
Chair 1 2
Total 2 3
View 7 Replies
View Related
Aug 24, 2006
Hi,
I have a table like this:
CatalogID CatalogName RootID
--------------------------------------------------
1 Microsoft 0
2 Macromedia 0
3 Office 1
4 Flash 2
5 MSN 1
6 Dreamweaver 2
7 Firework 2
8 Visual Studio 1
I want to form a list about company and product using SQL language.
Example:
Microsoft
Office
MSN
Visual Studio
Macromedia
Flash
Dreamweaver
Firework
How can I do ? Thank you.
View 5 Replies
View Related
Oct 22, 2007
In my ASP.NET app, I'm executing a stored procedure via a SQLCommand the searches a customer database. I believe the default timeout is 90 seconds. I'm curious of what happens to the SQL Server Stored Procedure after timing out from the ASP.NET application. Does it timeout at the same time or do you have to set up a value in SQL Server?
View 1 Replies
View Related
Aug 18, 2006
hello,
I have tried myReader.GetSqlString, GetSqlValue, GetSqlInt16, etc...etc...
But I keep getting an error (System.InvalidCastException was caught Message="Conversion from type 'SqlInt32' to type 'String' is not valid." Source="Microsoft.VisualBasic" StackTrace: at Microsoft.VisualBasic.CompilerServices.Conversions.ToString(Object Value) at ImportDelimitedFile.SumCurrentAmount() in C:Documents and Settingsemg3703My DocumentsVisual Studio 2005EscuelasComunidadImportDelimitedFile.aspx.vb:line 556)
Here is my code:
Public Function SumCurrentAmount() As String Dim sqlconn As New SqlConnection(ConfigurationManager.ConnectionStrings("GDBRemitanceConnectionString1").ConnectionString) Dim sqlcmd As New SqlCommand("SELECT SUM(CONVERT (Int, Field_6)) AS TotalAmount, Record_Type FROM tblTempWorkingStorage_NACHA GROUP BY Record_Type HAVING (Record_Type = '6')", sqlconn) Try sqlcmd.Connection.Open() Dim myReader As SqlDataReader myReader = sqlcmd.ExecuteReader(CommandBehavior.CloseConnection) If myReader.Read() Then SumCurrentAmount = CType(myReader.GetSqlValue(0), String) Return SumCurrentAmount Else End If myReader.Close() Catch End Try sqlcmd.Connection.Close() End Function
I need to know which "GetSql...(type) should I used to extract field numbre one from myReader.
Thanks a lot,
View 1 Replies
View Related
Jan 10, 2007
i getting the following error message in runtime, i have no idea what my username and password is for my computer, does anyone know what this error message means, and how i can get my username and password.
Server Error in '/' Application.
Cannot open user default database. Login failed.Login failed for user 'ACER-0BCB4DEC3AASPNET'.
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: Cannot open user default database. Login failed.Login failed for user 'ACER-0BCB4DEC3AASPNET'.Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace:
[SqlException (0x80131904): Cannot open user default database. Login failed.
Login failed for user 'ACER-0BCB4DEC3AASPNET'.]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +735107
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1838
System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +33
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +628
System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +170
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +359
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +424
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +496
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
System.Data.SqlClient.SqlConnection.Open() +111
System.Web.DataAccess.SqlConnectionHolder.Open(HttpContext context, Boolean revertImpersonate) +84
System.Web.DataAccess.SqlConnectionHelper.GetConnection(String connectionString, Boolean revertImpersonation) +197
System.Web.Security.SqlMembershipProvider.GetPasswordWithFormat(String username, Boolean updateLastLoginActivityDate, Int32& status, String& password, Int32& passwordFormat, String& passwordSalt, Int32& failedPasswordAttemptCount, Int32& failedPasswordAnswerAttemptCount, Boolean& isApproved, DateTime& lastLoginDate, DateTime& lastActivityDate) +1121
System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved, String& salt, Int32& passwordFormat) +105
System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved) +42
System.Web.Security.SqlMembershipProvider.ValidateUser(String username, String password) +83
System.Web.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgs e) +160
System.Web.UI.WebControls.Login.AttemptLogin() +105
System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e) +99
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35
System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +115
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +163
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42
P.s Also does any one know how to enable cookies for the login control on website.
i have noticed within the objectdatasource wizard, that something called profile is there, and this is where you specify the cookies, sessions etc. But i dont know where to start with this. Can anyone help?
thanks
andy
View 16 Replies
View Related
Feb 9, 2007
I've made a form and now all I want to do is save everything in the form into a new database file but I don't know how. I'm using Visual Web Developer 2005. Somehow I'm guessing that I have to set something somewhere so when the submit button is hit, it knows to save it to a database file which doesn't exist yet so it would have to create it. It should be easy but I can't figure it out.
View 1 Replies
View Related
Apr 10, 2007
Hi all,
I'm trying to do an extremely simple task here: add information from a signup form into an SQL database. Sadly, I can't figure out how to get the values into the DB.
Here's my form:
<form id="form1" runat="server"> <div> <asp:Label ID="lblName" runat="server" Text="Your Name:"></asp:Label> <br /> <asp:TextBox ID="txtName" runat="server"></asp:TextBox> <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtName" ErrorMessage="RequiredFieldValidator"></asp:RequiredFieldValidator><br /> <asp:Label ID="lblEmail" runat="server" Text="Your Email Address:"></asp:Label> <br /> <asp:TextBox ID="txtEmail" runat="server"></asp:TextBox> <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtEmail" ErrorMessage="RequiredFieldValidator"></asp:RequiredFieldValidator> <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtEmail" ErrorMessage="RegularExpressionValidator" ValidationExpression="w+([-+.']w+)*@w+([-.]w+)*.w+([-.]w+)*"></asp:RegularExpressionValidator><br /> <br /> <asp:Label ID="lblSubscribe" runat="server" AssociatedControlID="radSubscribe" Text="Subscribe"></asp:Label> <asp:RadioButton ID="radSubscribe" runat="server" Checked="True" /><br /> <br /> <asp:Label ID="lblUnsubscribe" runat="server" AssociatedControlID="radUnsubscribe" Text="Unsubscribe"></asp:Label> <asp:RadioButton ID="radUnsubscribe" runat="server" /><br /> <br /> <asp:Button ID="btnSignup" runat="server" Text="Signup" OnClick="btnSignup_Click" /></div> </form>
View 1 Replies
View Related