Details View ItemUpdating Problem
May 14, 2008
Good dady to everyone, can someone help me with the code in item updating in detailsView, here is my fields ID w/ Primary Key, LastName, FirstName, MiddleName, Address,TelNo,CelNo, EmailAddress, Nationality, [Marital Status], Gender, Age, BirthPlace, BirthDate im using ms access database and microsoft visual studio here is my code pls help me...
good dady to everyone,
can someone help me with the code in item updating in detailsView, here is my fields
ID w/ Primary Key, LastName, FirstName, MiddleName, Address,TelNo,CelNo, EmailAddress, Nationality, [Marital Status], Gender, Age, BirthPlace, BirthDate
im using ms access database and microsoft visual studio here is my code pls help me...
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.OleDb;
public partial class Details : System.Web.UI.Page
{string stcron = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\Database\db1.mdb;Persist Security Info=False";
System.Data.OleDb.OleDbConnection cn = new System.Data.OleDb.OleDbConnection();System.Data.OleDb.OleDbDataAdapter da = new System.Data.OleDb.OleDbDataAdapter();
System.Data.OleDb.OleDbCommand dc = new System.Data.OleDb.OleDbCommand();protected void Page_Load(object sender, EventArgs e)
{AccessDataSource1.DataFile = ConfigurationSettings.AppSettings["dbLocation"].ToString();
cn = new System.Data.OleDb.OleDbConnection(stcron);DataTable dt = new DataTable();
int ID = Int32.Parse(Request.QueryString["rowID"]);AccessDataSource1.SelectCommand = "Select * from tblUser where id=" + ID + "";FormView1.DataSourceID = "AccessDataSource1";
}
protected void DetailsView1_ItemUpdating(object sender, DetailsViewUpdateEventArgs e)
{TextBox Textbox1 = (TextBox)PreviousPage.FindControl("Textbox1");
TextBox Textbox2 = (TextBox)PreviousPage.FindControl("Textbox2");TextBox Textbox3 = (TextBox)PreviousPage.FindControl("Textbox3");
TextBox Textbox4 = (TextBox)PreviousPage.FindControl("Textbox4");TextBox Textbox5 = (TextBox)PreviousPage.FindControl("Textbox5");
TextBox Textbox6 = (TextBox)PreviousPage.FindControl("Textbox6");TextBox Textbox7 = (TextBox)PreviousPage.FindControl("Textbox7");
TextBox Textbox8 = (TextBox)PreviousPage.FindControl("Textbox8");TextBox Textbox9 = (TextBox)PreviousPage.FindControl("Textbox9");
TextBox Textbox10 = (TextBox)PreviousPage.FindControl("Textbox10");TextBox Textbox11 = (TextBox)PreviousPage.FindControl("Textbox11");
TextBox Textbox12 = (TextBox)PreviousPage.FindControl("Textbox12");TextBox Textbox13 = (TextBox)PreviousPage.FindControl("Textbox13");
int rowID = Convert.ToInt32(e.Keys["ID"].ToString());if (Textbox1 != null)
{
cn.Open();
dc = cn.CreateCommand();string strQry = @"UPDATE tblUser Set (LastName,FirstName,MiddleName,Address,TelNo,CelNo,EmailAdd,Nationality,[Marital Status],Gender,Age,BirthPlace,BirthDate)" + "Values ('" + Textbox1.Text + "','" + Textbox2.Text + "','" + Textbox3.Text + "','" + Textbox4.Text + "','" + Textbox5.Text + "','" + Textbox6.Text + "','" + Textbox7.Text + "','" + Textbox8.Text + "','" + Textbox9.Text + "','" + Textbox10.Text + "','" + Textbox11.Text + "','" + Textbox12.Text + "','" + Textbox13.Text + "')";
dc.CommandText = strQry;
dc.ExecuteNonQuery();
cn.Close();
}
}
}
tnx in advance
migs
View 8 Replies
ADVERTISEMENT
Aug 31, 2004
Please may I have your assistance with the following
I’m struggling to view the transaction log for a database.
I’m using the following command structure
DBCC log ( {dbid|dbname}, [, type={-1|0|1|2|3|4}] )
PARAMETERS:
Dbid or dbname - Enter either the dbid or the name of the database
in question.
type - is the type of output:
0 - minimum information (operation, context, transaction id)
1 - more information (plus flags, tags, row length)
2 - very detailed information (plus object name, index name,
page id, slot id)
3 - full information about each operation
4 - full information about each operation plus hexadecimal dump
of the current transaction log's row.
-1 - full information about each operation plus hexadecimal dump
of the current transaction log's row, plus Checkpoint Begin,
DB Version, Max XACTID
Which I got from a web site, however the output does not make sense to me
Ideally I would like to analyse which SQL insert commands are predominantly using the log file
Any ideas how to do this or a tool that u recommend
Thanks in advance for your help
:confused:
View 4 Replies
View Related
May 30, 2006
I have a client site running SQL 2000. It seems some data rows havebeen deleted and several tables have been dropped. I have a current dbbackup which contains a 34GB log file, but I don't know how to view it.Is there any way to search through the log file and determine when thedata was lost or what process/user dropped the tables?Thanks,Tull.
View 1 Replies
View Related
Apr 12, 2007
I have tried just about everything i could find on the internet to fix this.
Anyway.....I have a sql databasewith 3 colums: Client ID, Client Name, and Client Address
I have no trouble reading the database through the gridview, but when i try to add a script that allows me to add to that database off of my site, I get error after error.
Anyone who can figure this out must be a sql genius (or I am a complete idoit).
Here is the code I have so far:
<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" %>
<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="ContentPlaceHolder1">
<script runat="server">
Dim strClient_Name As String
Dim strClient_Address As String
</script>
<asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" DataKeyNames="Client ID"
DataSourceID="SqlDataSource1" Height="50px" Width="125px">
<Fields>
<asp:BoundField DataField="Client Name" HeaderText="Client Name" SortExpression="Client Name" />
<asp:BoundField DataField="Client Address" HeaderText="Client Address" SortExpression="Client Address" />
<asp:BoundField DataField="Client ID" HeaderText="Client ID" InsertVisible="False"
ReadOnly="True" SortExpression="Client ID" />
<asp:CommandField ShowInsertButton="True" />
</Fields>
</asp:DetailsView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:clientInfoConnectionString %>"
InsertCommand="INSERT INTO [Clients] ([Client Name], [Client Address]) VALUES (strClient_Name, strClient_Address)"
SelectCommand="SELECT [Client Name], [Client Address], [Client ID] FROM Clients">
</asp:SqlDataSource>
</asp:Content>
Best Regards and Thank You,
The King
View 6 Replies
View Related
May 20, 2006
I'm some what of a noob when it comes to ASP.NET 2.0 and SQL Server 2005 Express editions, so please bare with me. I have created a basic database that is only one table. One of the fields is LogPicture with type of image. I just want to go into the table and manually place a picture in the table, but it seems like I can not get the format down. I have tried including the picture I want into the project, but no dice. I've also tried putting the physical pathname (on the harddrive) and the web address of this field in there. Suggestions please?
View 2 Replies
View Related
Aug 26, 2006
I'm a new user to vwd. If I use a details view control on my page, I have noticed that the "New" link is not visible unless there is at least one record in the table. Is there any way of making it visible where there aren't any records?My web pages are currently hosted at vwdhosting. I have uploaded my database with the record structure onto the web site and I am using a remote connection string to access it. I have had users updating data in another table on the remote database. If I add records to my new table locally and upload the database to the remote site, all the data that my users have been adding will be lost. So, if I can't add my first record using a control on my web page when there are no records in the table, should I be doing it programmatically? If so, how?Thanks,Julie
View 2 Replies
View Related
Oct 27, 2006
hi,i have an sql database on my server on the world wide web.i can make a connection to the database in visual web developer and all the tables etc are shown in the 'database explorer' of visual web developerwhen i make the query in visual web developer it does retrieve the data froom the remote server database when i 'test query'.... so looking great!the connection string in the webconfig file is left as the default when i run the prgram on my LOCAL HOST with the inbult server that comes with visual web developer it runs fine......so.....running on my local pc it will connect to the database on my www host server and does display the data from that database.i need to change the webconfig files path to the connection by default it is |DataDirectory|if i change this to the path i suspect is correct as this is the connection i use to the database C:Inetpubvhostsarcvillage.comhttpdocsApp_DataTestdatabase.mdfwhen i change the path in webconfig then it stops working on my localhost and the error when i ftp it to my host is:Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path. Please make sure the user has a local user profile on the computer. The connection will be closed. any ideas?
View 2 Replies
View Related
Feb 12, 2014
I created a view with a simple join query
there are 2 rows with orderid as null, i am unable to fetch the details when i give WHERE Condition as
"select orderid from joins where orderid=NULL"
Query :
create view joins as
select A.customerid,A.Companyname,A.Contactname,A.City,B.OrderId from Customers A
left join orders B
on A.Customerid=B.Customerid
View 1 Replies
View Related
Apr 4, 2008
Hi.
I building some reports with SSRS, and showing data in a table. The table has one Details row that forms at the end multiple rows with the tree view (+ and -).
Is there a way to open the tree view upwards and not downwards so that the children of level 2, 3 etc come over the parent row?
I've goggled it everywhere, but I don't seem to find the answer. If anyone could help me out, I would appreciated.
Thanks
Novi
View 2 Replies
View Related
Nov 30, 2007
Hi,
Is there any way to capture the log details such as row count of the data flow,number of success rows and failed rows in a separate table?
View 3 Replies
View Related
Aug 15, 2004
Well I made a bussiness object for registering users as well as logging them in. I dont know if my bussiness obect is screwed up or if its the database, or the SQL syntax or what. Please take a look at this. I am not getting any error messages, but nothing is being added to the server. I am using MSDE for the SQL Server.
Here's my bussiness object:
Imports System
Imports System.Data
imports System.Data.oledb
NameSpace LoveShare
Public Class UserDetails
public UserID AS Integer
public FirstName AS String
public LastName AS String
public UserName AS string
public Password AS String
public Address AS String
public City AS String
public State AS String
public Zip As Integer
public Email AS String
End Class
Public Class User
Private objConn As New oledbConnection("Provider=sqloledb;Data Source=GARAGESALELOVESHARE;Initial Catalog=LoveShare1;User Id=sa;Password=notonthispost;")
Public function Login(strUsername AS String, strPassword As String) As Integer
dim intID as integer
dim objparam AS new oledbparameter
dim objcmd AS oledbCommand
objCmd = new oledbCommand("dbo.SPLoginUser", objconn)
objcmd.commandtype = commandtype.Storedprocedure
objparam = New oledbparameter("@UserName", oledbtype.Char)
objParam.Value = strUserName
objCmd.Parameters.Add(objParam)
objParam = New oledbParameter("@Password", OleDbType.Char)
objParam.Value = strPassword
objCmd.Parameters.Add(ObjParam)
Try
objConn.Open
intID = CType(objCmd.ExecuteScalar, Integer)
objConn.Close
Catch e As Exception
Throw e
End Try
If intID.toString = "" Then
return 0
End if
Return intID
end function
Public Sub AddUser(objUser As UserDetails)
Dim intId as integer
Dim objReader As oledbdataReader
Dim objCmdID As New oledbCommand("SELECT MAX(userID) FROM tblUsers", objconn)
Dim objcmd AS New oleDBCommand("spAddUser", objConn)
Dim objparam AS OleDbParameter
objCmd.CommandType = CommandType.StoredProcedure
objParam = New oleDbParameter("@FirstName", oledbtype.Char)
objParam.value = objuser.FirstName
objCmd.Parameters.add(objParam)
objParam = New oleDbParameter("@LastName", oledbtype.Char)
objParam.value = objuser.LastName
objCmd.Parameters.add(objParam)
objParam = new oleDbParameter("@UserName", oledbtype.Char)
objParam.Value = objUser.UserName
objCmd.Parameters.Add(objParam)
objParam = New oleDbParameter("@Password", oledbtype.Char)
objParam.value = objuser.Password
objCmd.Parameters.add(objParam)
objParam = New oleDbParameter("@Email", oledbtype.Char)
objParam.value = objuser.Email
objCmd.Parameters.add(objParam)
objParam = New oleDbParameter("@Address", oledbtype.Char)
objParam.value = objuser.Address
objCmd.Parameters.add(objParam)
objParam = New oleDbParameter("@City", oledbtype.Char)
objParam.value = objuser.City
objCmd.Parameters.add(objParam)
objParam = New oleDbParameter("@State", oledbtype.Char)
objParam.value = objuser.State
objCmd.Parameters.add(objParam)
objParam = New oleDbParameter("@Zip", oledbtype.Integer)
objParam.value = objuser.Zip
objCmd.Parameters.add(objParam)
Try
objConn.Open
ObjCmd.ExecuteNonQuery
objUser.UserID = CType(objCmdID.ExecuteScalar, Integer)
objConn.Close
Catch e AS Exception
Throw e
End try
If objUser.UserID.ToString = "" then
objuser.UserID = 25
End if
End Sub
End Class
End NameSpace
Here's is my stored procedure for the registration:
CREATE PROCEDURE [dbo].[SPAddUser]
@FirstName VarChar(255),
@LastName VarChar(255),
@UserName VarChar(255),
@Password VarChar(255),
@Email VarChar(255),
@Address VarChar(255) ,
@City VarChar(255),
@State VarChar(255) ,
@Zip [INT]
AS
INSERT INTO tblUsers (FirstName, LastName, UserName, Password, Email, Address, City, State, Zip)
VALUES (@FirstName, @LAstName, @UserName, @Password, @Email, @Address, @City, @State, @Zip)
GO
And here is the actual registration page
<%@ Page Language="VB" %>
<%@ Register tagPrefix="LoveShare" TagName="Header" src="head.ascx" %>
<%@ Register tagPrefix="LoveShare" TagName="Menu" src="Men.ascx" %>
<%@ Register tagPrefix="LoveShare" TagName="Stats" src="Stats.ascx" %>
<%@ Register tagPrefix="LoveShare" TagName="Footer" src="foot.ascx" %>
<%@ Import Namespace="system" %>
<%@ Import NameSpace="System.Data" %>
<%@ Import NameSpace="LoveShare" %>
<script runat="server">
Public sub Submit(sender as object, e as eventargs)
If Page.IsValid then
dim objuserdetails as New LoveShare.UserDetails
dim objuser As New LoveShare.User
objuserDetails.FirstName=tbFirstName.Text
objuserDetails.LastName=tbLastName.Text
objUserDetails.Username=tbUserName.Text
objuserDetails.Password=tbPassword.Text
objUserDetails.Email=tbEmail.Text
objUserDetails.Address=tbAddress.Text
objUserDetails.City=tbCity.Text
objUserDetails.State=tbState.Text
objuserDetails.Zip=tbState.Text
ObjUser.AddUser(objUserDetails)
Session("UserID") = objUserDetails.UserID
FormsAuthentication.SetAuthCookie(objUserDetails.UserID, false)
Response.Redirect("index.aspx")
else
lblMessage.text="Information entered incorrectly"
End If
End Sub
</Script>
<html>
<body BGCOLOR="00ccFF">
<Table Width="800">
<tr>
<td>
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td>
<LoveShare:Header runat="server" />
</td>
</tr>
<tr>
<td>
<Table cellpadding="0" cellspacing="15" Width="800">
<tr>
<td>
</td>
<td>
<td>
<form runat="server">
<table cellpadding="3" cellspacing="0" width="100%">
<tr>
<td colspan="2" Align="center">
<Font size="6">Sign Up Today!<BR><BR></Font>
</td>
</tr>
<tr>
<td Align="Center">
<Font color="red">
<asp:label id="lblMessage" runat="server" />
</font>
</td>
</tr>
<tr>
<td Align="right">First Name:</td>
<td Align="Left"><asp:textbox id="tbFirstName" runat="server" />
<asp:requiredfieldValidator runat="server" Controltovalidate="tbFirstName" ErrorMessage="First Name Required" Text="Forgot First Name" Display="Dynamic"/>
</td>
</tr>
<tr>
<td Align="right">Last Name:</Td>
<td Align="Left"><asp:textbox id="tbLastName" runat="server" />
<asp:requiredfieldValidator runat="server" Controltovalidate="tbLastName" ErrorMessage="Last Name Required" Text="Forgot Last Name" Display="Dynamic"/>
</td>
</tr>
<tr>
<td Align="right">Desired UserName:</td>
<td Align="Left"><asp:textbox id="tbUserName" runat="server" />
<asp:requiredfieldValidator runat="server" Controltovalidate="tbUserName" ErrorMessage="UserName required" Text="Forgot UserName" Display="Dynamic"/>
</td>
</tr>
<tr>
<td Align="right">Password:</td>
<td Align="Left"><asp:textbox id="tbPassword" Textmode="Password" runat="server" />
<asp:requiredfieldValidator runat="server" Controltovalidate="tbPassword" ErrorMessage="Password Required" Text="Forgot Password" Display="Dynamic"/>
</td>
</tr>
<tr>
<td Align="right">Verify Password:</td>
<td Align="Left"><asp:textbox id="tbVPassword" Textmode="password" runat="server" />
<asp:requiredfieldValidator runat="server" Controltovalidate="tbVPassword" ErrorMessage="Verify Password" Text="Forgot to verify Password" Display="Dynamic"/>
</td>
</tr>
<tr>
<td Align="right">Email Address:</td>
<td Align="Left"><asp:textbox id="tbEmail" runat="server" />
<asp:requiredfieldValidator runat="server" Controltovalidate="tbEmail" ErrorMessage="Email address required" Text="Forgot Email address" Display="Dynamic"/>
</td>
</tr>
<tr>
<td Align="right">Verify Email Address:</td>
<td Align="Left"><asp:textbox id="tbVEmail" runat="server" />
<asp:requiredfieldValidator runat="server" Controltovalidate="tbVEmail" ErrorMessage="Must verify Email address" Text="Verify Email address" Display="Dynamic"/>
</td>
</tr>
<td Align="right">Street Address</td>
<td Align="Left"><asp:textbox id="tbAddress" runat="server" />
<asp:requiredfieldValidator runat="server" Controltovalidate="tbAddress" ErrorMessage="Street Address Required" Text="Forgot Address" Display="Dynamic"/>
</td>
</tr>
<tr>
<td Align="right">City:</td>
<td Align="Left"><asp:textbox id="tbCity" runat="server" />
<asp:requiredfieldValidator runat="server" Controltovalidate="tbCity" ErrorMessage="City Required" Text="Forgot City" Display="Dynamic"/>
</td>
</tr>
<tr>
<td Align="right">State:</td>
<td Align="Left"><asp:textbox id="tbState" runat="server" />
<asp:requiredfieldValidator runat="server" Controltovalidate="tbState" ErrorMessage="State Required" Text="Forgot State" Display="Dynamic"/>
</td>
</tr>
<tr>
<td Align="right">Zip:</td>
<td Align="Left"><asp:textbox id="tbZip" runat="server" />
<asp:requiredfieldValidator runat="server" Controltovalidate="tbZip" ErrorMessage="Zip Code Required" Text="Forgot Zip" Display="Dynamic"/>
</td>
</tr>
<tr>
<td Align="right"> </td>
<td Align="Left"><asp:button id="btsignup" text="Sign Up" onclink="submit" runat="server" />
</tr>
</table>
</form>
</td>
<td>
</td>
</tr>
</table>
</td>
</tr>
</tr>
<td>
</td>
</tr>
<tr>
<td>
<LoveShare:Footer runat="server" />
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
Please help, I cannot figure out what is wrong
View 1 Replies
View Related
Mar 10, 2005
Hi,
I need to get the index_name,colum_name and table_name in entire database.
Coule you let me know how I can get that details.
Thanks,
View 7 Replies
View Related
Sep 28, 2006
Hi,
I used my DB and some tables for replication earlier, now i removed my all replication subscription and publication and my DB is out of replication.
Now i am altering my table for PK then its giving err as follows:
Cannot alter the table 'mstparty' because it is being published for replication.
From where i can find details, i mean in which sys table all replication obj are stored.
There is no Replication now on DB then why still table 'mstparty' has a replication err when i alter table.
Please advice as i am not able to alter my table or tables which earlier i used in replication and now i removed replication.
View 5 Replies
View Related
Apr 5, 2007
I have a database which has contact column eg. Mr Peter Smith
I am writing a new database which is to have three seperate columns.. saluation, first name and surname. What would be the best way to split the column up?? I was thinking on concentrating on the spaces??
Note: some conacts may not have saluation inc in the contact column, and in this case the saluation column should be blank...
Thanks
View 1 Replies
View Related
Apr 30, 2007
Hello
Is there any script or procedure which can give the object name , type ,status and owner in a database.
Thanks
View 2 Replies
View Related
Aug 28, 2007
Can somebody please go in depth detail what exactly is done in OLAP? i know it deals with the data warehouse end. but what does the SQL DBA do in the OLAP end? please elaborate. thanks.
View 5 Replies
View Related
Jul 23, 2005
How can i get the details of the error in sql server 2000 such where itoccurs in which line. I need something like i get in sql query analyzer.--Message posted via http://www.sqlmonster.com
View 4 Replies
View Related
Apr 28, 2008
I Have so many user create trigger's in my database
like create trigger trig_name
Now i want to see what does what and delete the unnecessary ones.
How can i See the logic in the trigger.
I can get the trigger name but not the logic using this query .
SELECT S2.[name] TableName, S1.[name] TriggerName,
CASE
WHEN S2.deltrig = s1.id THEN 'Delete'
WHEN S2.instrig = s1.id THEN 'Insert'
WHEN S2.updtrig = s1.id THEN 'Update'
END 'TriggerType' , 'S1',s1.*,'S2',s2.*
FROM sysobjects S1 JOIN sysobjects S2 ON S1.parent_obj = S2.[id]
How to see the logic.
View 6 Replies
View Related
Dec 12, 2006
Where is, (or even does it exists) the best place to look for some details on when package execution fails if running as a scheduled job. Obviously when you run from the command line or in VS, there is plenty of output detail on progress and on the source of errors, but when you run it as a scheduled job, it just says step 1 failed in the sql server log, and package foo failed in the NT application log . Is there anywhere to find this info or do we need to build error traps into the package to write stuff out somewhere?
THX
Dave
View 2 Replies
View Related
Jul 23, 2005
I am looking to create a constraint on a table that allows multiplenulls but all non-nulls must be unique.I found the following scripthttp://www.windowsitpro.com/Files/0.../Listing_01.txtthat works fine, but the following lineCREATE UNIQUE CLUSTERED INDEX idx1 ON v_multinulls(a)appears to use indexed views. I have run this on a version of SQLStandard edition and this line works fine. I was of the understandingthat you could only create indexed views on SQL Enterprise Edition?
View 3 Replies
View Related
Jul 24, 2012
Write a CREATE VIEW statement that defines a view named Invoice Basic that returns three columns: VendorName, InvoiceNumber, and InvoiceTotal. Then, write a SELECT statement that returns all of the columns in the view, sorted by VendorName, where the first letter of the vendor name is N, O, or P.
This is what I have so far,
CREATE VIEW InvoiceBasic AS
SELECT VendorName, InvoiceNumber, InvoiceTotal
From Vendors JOIN Invoices
ON Vendors.VendorID = Invoices.VendorID
[code]...
View 2 Replies
View Related
Aug 24, 2007
Hi guys 'n gals,
I created a query, which makes use of a temp table, and I need the results to be displayed in a View. Unfortunately, Views do not support temp tables, as far as I know, so I put my code in a stored procedure, with the hope I could call it from a View....
I tried:
CREATE VIEW [qryMyView]
AS
EXEC pr_MyProc
and unfortunately, it does not let this run.
Anybody able to help me out please?
Cheers!
View 3 Replies
View Related
Nov 23, 2006
First, soapbox questions for someone who might have more direct pull with Microsoft (or at least knowledge of how I should work with what they've given us), then a more specific question:
Scenario: You install SQL Server Express (or any other version, it doesn't matter) and the feedback with all the little green checkmarks tells you it has installed successfully. "Oh goody," say people (like me) who are not super experienced with SQL Server, "it installed successfully; now I can jump in and start using it!" But it aint so--there are so many other hoops to jump through before it really becomes operational.
After successful installation, why can't some link become visible indicating what you have to do after that? I mean, it's fine to wade through all the questions in this forum and get answers from all you nice and informed guys, AFTER the problems start coming; but I would rather not have to associate with you, to be honest, in terms of time spent that could be going into my projects.
Why isn't there a comprehensive guide right off the bat? That is, something referenced immediately that tells you such things as: how to register a database with emphasis on the fact that just creating a database won't do the trick for your application; how to set permissions and rights; that (what was I reading in the advice of one post?) you have to register both the database and the user, blah blah; all about instances, the web.config file, etc. etc. I mean, doesn't it seem logical that by virtue of a person installing the database, come on, that this is a pretty good indication that he/she in all likelihood is new at it? As it is now, all they tell you on the SSE site is that you have to have the .NET Framework installed; and the green checkmarks indicating that you've installed it correctly (sorry for mentioning that twice).
"OK, self," I say, "I have the Framework installed and SSE installed correctly, so let's get to work." Then the trouble begins. Unless Microsoft's purpose is to keep you tech guys and book writers in business, I don't understand why they don't give more up-front guidance. Any thoughts on why they work it this way? Bueller, Bueller? Anyone, anyone?
Now, to the question that's pressing me at the moment: I've installed SSE and I'm going through a tutorial ("How Do I: Create Data-Driven Web Sites?" on http://www.asp.net/getstarted/default.aspx?tabid=61). Yeah, the guy makes it look really easy. He creates a database then shuts down the connection. I try to do the same things and I'm informed that I don't even have a valid connection! How SQL-Server-Express fun and easy is that? It's a real AdventureWorks, if you ask me.
OK, that's my rant; and since MS didn't think in advance and implement my idea of a link to jump off from the installation menu, I have to face the reality of learning this by putting all the pieces together myself. So, my question is, before I try to go through the video and get more frustrated, WHERE DO I GO FOR THE MOST BASIC OF ALL THE STEPS I NEED TO DO, ONE BY ONE? This is like the second "beginner" video I've tried to go through but even these don't start at the very beginning with information on how to register a new database, making the user a part of aspnetWHATEVER, what permissions to dole out, etc.
Guidance is solicited and will be most appreciated. Thanks, Bryan
View 1 Replies
View Related
Jan 21, 2007
Master table (tlbProduct) having productID as Primary key and which acts as reference key for table (tlbCategory).Fields for tlbProduct are productID,productNameFields for tlbCategort are productID,CategoryID(primary key),CategoryName,Prizeboth productID,CategoryID are autoincrementing.but when i write two inserts simultaneously as follows insert into tlbProduct(productName)values(@productName)insert into tlbCategory(CategoryName,Prize) using sqldatasourceI get the error that ProductID value is null which is not providedBut (productId in both is autoincremented) and relationship is there in both tables How to resolve this problem without adding ProductID in second Insert?SWati
View 1 Replies
View Related
Mar 20, 2006
HI, I'm using Visual Web Developer and SQL Server 2005 Express Editions. I have a database with two tables, say AccountsTable and PersonsTable, with a one to many relationship respectively.
Given a particular selected record in PersonsTable, I need to look up the corresponding master record in AccountsTable. Here's what I've done:
SqlDataSource1 has a "SELECT * FROM PersonsTable" and a GridView1 which uses this as its datasource and the 'enable Selection' checkbox is On. This works fine.
Then, I create a second SqlDataSource2. When I click on the WHERE button in the Configure Data Source page, I have chosen the following parameters:
Column:PrimaryKeyField; Operator:=; Source=Control; ControlID=GridView1; Default Value='I left this blank' but the Value field shows GridView1.SelectedValue when I click the ADD button.
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:bizConnectionString %>"
SelectCommand="SELECT * FROM [AccountsTable] WHERE ([AccountNumber] = @AccountNumber)">
<SelectParameters>
<asp:ControlParameter ControlID="GridView1" Name="AccountNumber" PropertyName="SelectedValue"
Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>
I have bound DetailsView1 to SqlDataSource2. When I run the page, the GridView1 is shown with Persons records OK. Then I click the 'Select' next to a record in the Gridview expecting the corresponding lookup to the master record (Account) to be shown in the DetailsView, but it does not show anything.
What am I doing wrong? Is there a better way of doing this?
Your help is much appreciated. Thank you.
PS. I could find Tutorials showing Master/Details retrieving records in a top down fashion (1:n), but I could not find the reverse (n:1)
View 6 Replies
View Related
Jul 14, 1999
Does anyone know if the enhanced data types (character length up to 8,000 bytes for some types) and the increase in the number of tables used in joins are available when using the 65 backward compatibility mode?
Many thanks in advance...
View 1 Replies
View Related
Feb 13, 2006
Need to ask this, 'cause as ya'all know I'm a GUID sort of guy with a sever IDENTITY crisis.
Got a client that erroneously deleted some records from a table with an IDENTITY key. We have a backup that we can restore to a new db to isolate the records that need to be reloaded. Question is, when we set IDENTITY INSERT to ON temporarily to reload the affected records, does the db need to be in single-user mode, or will it go merrily on creating IDENTITY values for new records if the db is in use during our fix? It is a 24/7 production db with web users around the country/world.
View 4 Replies
View Related
Apr 24, 2007
Hi everyone,
I am having a header table and details table and I want to display first 2 records against each header from details, whatever number of records are there in details against each header.
Example :
=======
Details table is as follows
HeaderID DetailsID
1 1
1 2
1 3
2 4
3 5
3 6
3 7
3 8
output should be:
TransDate SupplierName HeaderID DetailsID
1/1/2000 abc 1 1
1/1/2000 dsds 1 2
2/3/2003 fgd 2 4
2/4/2005 sdsd 3 5
1/1/2006 fgfdg 3 6
I am using the following query
SELECT H.TransDate, H.SupplierName, D.DetailsID FROM
Header H, Details D
WHERE H.HeaderID = D.DetailsID
AND D.DetailsID IN (SELECT TOP 2 DetailsID FROM Details WHERE HeaderID = H.HeaderID)
As I am dealing with very huge data it is taking very long time to execute.
Is there any better way to accomplish the task?
Thanks.
Riyaz
View 14 Replies
View Related
Apr 8, 2008
Hi
I have a categories table and a products table, the products are associated with a category, and my current select statement looks like this..
SELECT COUNT(dbo.tbl_Categories.CatName) AS TotQty, dbo.tbl_Categories.CatName
FROM dbo.tbl_Products INNER JOIN
dbo.tbl_Categories ON dbo.tbl_Products.CatID = dbo.tbl_Categories.ID
GROUP BY dbo.tbl_Categories.CatName
this give me ..
TotQty CatName
1 Books
2 DVD
I wonder how I can change the select statement so I retrieve a result like this..
TotQty CatName Description
1 Books Oliver Twist
2 DVD Dire Straits
2 DVD Elvis
View 20 Replies
View Related
Apr 23, 2008
I need to combine the details of two tables and narrow the data included.
in my tutor table i have
tutorLastName, tutorSessions and tutorSkills
in my term table i have
week, date, session_Name, tutorName
i need to combine the tales to show:
(from the term table) week, date,session_Name, tutorName,
(from the tutor table) tutorSkills.
i then need to narrow the table down so it shows only tutors with guitar skills and the term dats when the session_name is empty
i can run the two searches sepereately but cannot combine them i am tryin to use Where date = "whateverdate" AND session_name is null
AND tutorSkills = guitar
please help and tell me where im going wrong
View 2 Replies
View Related
Feb 3, 2014
I need to display data from both header and detail, details has to come from other table also
CREATE TABLE [dbo].[Table_Detail](
[Header_ID] [int] NOT NULL,
[Name] [nvarchar](50) NOT NULL,
[DescValue] [nvarchar](max) NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
[code]....
..consider the dept code, where the values are now comming from table and need result if the data is not displayed from table and they are static..
use case when 'Bo' then 'Branch Office'
when 'Ro' then 'Reginal Office'
when 'So' then 'Sub Division Office'
when 'Ho' then 'Head Office'
How to replace my above query
Below is my sql
SELECT *
FROM
(
SELECT h.Header_ID,
td.ListNumber,
td.PhaseCode,
[code]...
View 4 Replies
View Related
Nov 14, 2006
Hi guys,
this is my first post and I am new to SQL server 2005 (well, SQL in general).
I have installed SQL server 2005 but cannot remember if I set authentication for it. I have just tried to access a database on this server through ASP (classic, not .NET) but get the error message saying that login failed for <servername>IUSR_<servername>.
There must be a simple way around this.
Also, is there a way for me to create trusted connections for my server now that it has been installed?
If anyone can give me a few ideas about authentication, etc, I would really appreciate it.
View 1 Replies
View Related
Feb 19, 2007
Hi
Can i able to see the all table structure at once throught the Select
statement.
How?
thansk
asm
View 2 Replies
View Related