
wayko
Avatar/Signature-
Posts
27 -
Joined
-
Last visited
wayko's Achievements
Newbie (1/14)
0
Reputation
-
Hi everyonre i have a template but when i run it i get this error do i have to set the web.config page for users to none? Server Error in '/aspnetsite' Application. -------------------------------------------------------------------------------- Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. Parser Error Message: Access is denied: 'TemplateControlLibrary'. Source Error: Line 196: <add assembly="System.EnterpriseServices, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/> Line 197: <add assembly="System.Web.Mobile, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/> Line 198: <add assembly="*"/> Line 199: </assemblies> Line 200: </compilation> Source File: c:\winnt\microsoft.net\framework\v1.1.4322\Config\machine.config Line: 198 Assembly Load Trace: The following information can be helpful to determine why the assembly 'TemplateControlLibrary' could not be loaded. === Pre-bind state information === LOG: DisplayName = TemplateControlLibrary (Partial) LOG: Appbase = file:///D:/cnewa-aspxsite LOG: Initial PrivatePath = bin Calling assembly : (Unknown). === LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind). LOG: Post-policy reference: TemplateControlLibrary LOG: Attempting download of new URL file:///C:/WINNT/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/aspnetsite/1f62c16b/68c589f1/TemplateControlLibrary.DLL. LOG: Attempting download of new URL file:///C:/WINNT/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/aspnetsite/1f62c16b/68c589f1/TemplateControlLibrary/TemplateControlLibrary.DLL. LOG: Attempting download of new URL file:///D:/cnewa-aspxsite/bin/TemplateControlLibrary.DLL.
-
Yes I even went to the database copy the column header and paste it right into the code but i did a work around its not the right way of doing it but it works what i did was i got the id into a textbox and wrote out a new code Dim num = TextBox7.Text If num = "" Then MsgBox("error no number") first() MsgBox("Have Re-loaded from begining") Else DataSet61.Clear() OleDbDataAdapter6.SelectCommand.Parameters("ID").Value = num - 1 OleDbDataAdapter6.SelectCommand.Connection.Open() Try OleDbDataAdapter6.SelectCommand.ExecuteNonQuery() OleDbDataAdapter6.Fill(DataSet61) Catch ex As Exception MsgBox(ex.Message) End Try OleDbDataAdapter6.SelectCommand.Connection.Close() but it should have worked normally it kinda worked with a dataview but it only showed one record all the time
-
I have a windows form that access a database I am able to get the first and last records but i want to get the next and previous records i tried Me.BindingContext(Me.DataSet81.Distribution_List.IDColumn, "ID").Position += 1 and Me.BindingContext(Me.DataSet81.Distribution_List.IDColumn, "ID").Position -= 1 but i get an error An unhandled exception of type 'System.ArgumentException' occurred in system.windows.forms.dll Additional information: Can't create a child list for field ID. is there a way to do it?
-
Does anyone know how to add the pocket pc or the smart phone emulator on vb.net? i downloaded the emulators ans when i goto browse with and i click add its looking for an exe file which i don't see do i have to use the xml file and create the exe?
-
got it to work i restarted computer and permissions took affect :)
-
nothing is open i checked task manager to make sure still the same error and i am getting it on other databases as well
-
System.Data.OleDb.OleDbException: Could not lock file. i get this error when i try to access a access db i added aspnet as a user with full permision on both the program and my server i tried working with sqlserver and it worked fine but access is no good
-
why does one insert work and not the other
wayko replied to wayko's topic in Database / XML / Reporting
no i haven't i tried DsCover.Tables(0).Rows(nIdx).RowState.Unchanged = DataRowState.Added still the same problem the funny thing is when i do it to another datagrid using a button on the form it works fine but when i do it from a datagrid button i get the error -
why does one insert work and not the other
wayko replied to wayko's topic in Database / XML / Reporting
also is there a way to set a cursor to blink on a textbox on load ie peron goes in webform and the first textbox already has the cursor blinking and waiting no need for mouse click -
why does one insert work and not the other
wayko replied to wayko's topic in Database / XML / Reporting
If dsDGIssue.Tables(0).Rows(nIdx).RowState always says unchanged i tried If dsDGIssue.Tables(0).Rows(nIdx).RowState <> DataRowState.Added it works the first time but since it always unchanged it would never update i tried doing a work around but thats not the way to go -
the code is long so i made a .vb of it i have 2 datagrids that updates and inserts infornation on a database one of them have a insert new row via a button Public Sub cb_insert_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cb_insert.Click Dim oCmd As New SqlClient.SqlCommand() oCmd.CommandText = "INSERT INTO dbo.Issue(volno,issueno,issueperiod,year) SELECT MAX(volno) + 1,1,'New Issue',max(year) + 1 FROM dbo.Issue" oCmd.Connection = daDGIssue.SelectCommand.Connection oCmd.Connection.Open() Try oCmd.ExecuteNonQuery() RefreshVolumeList() Catch err As SqlClient.SqlException txtmsg.Text = err.Message Return End Try dgIssue.EditItemIndex = dgIssue.Items.Count FinishPage() End Sub it would create a new row on the bottom of the first datagrid and when u click edit it becomes editable. when u click the update button it would do insert since it would do this If dsDGIssue.Tables(0).Rows(nIdx).RowState = DataRowState.Added Then oCmd = New SqlClient.SqlCommand() With oCmd oCmd.CommandText = "INSERT INTO dbo.Issue(volno,issueno,issueperiod,year, MagazineTitle, notes)" _ & " VALUES(@VolNo,@IssueNo, @IssuePer, @Year, @MagTitle, @Notes) " .Parameters.Add("@VolNo", dgVolno) .Parameters.Add("@IssueNo", uIssueNo) .Parameters.Add("@IssuePer", uIssuePeriod) .Parameters.Add("@Year", uYear) .Parameters.Add("@MagTitle", uMagTitle) .Parameters.Add("@Notes", uNotes) .Connection = daDGIssue.SelectCommand.Connection End With the 2nd datagrid has information inserted when a linkbutton on the first datagrid is pushed but when i click update it goes to this Else oCmd = daCover.UpdateCommand daCover.UpdateCommand.Parameters("@IssueId").Value = dgIssueid daCover.UpdateCommand.Parameters("@Caption").Value = uCaption daCover.UpdateCommand.Parameters("@PhotogCreditID").Value = uname daCover.UpdateCommand.Parameters("@tn_width").Value = uTnwidth daCover.UpdateCommand.Parameters("@tn_height").Value = uTnHeight daCover.UpdateCommand.Parameters("@Large_image").Value = uLargeimage daCover.UpdateCommand.Parameters("@full_width").Value = uFullwidth daCover.UpdateCommand.Parameters("@full_height").Value = uFullheight daCover.UpdateCommand.Parameters("@Notes").Value = uNotes daCover.UpdateCommand.Parameters("@Image").Value = utnImage End If If oCmd.Connection.State = ConnectionState.Closed Then oCmd.Connection.Open() End If Try oCmd.ExecuteNonQuery() Catch err As SqlClient.SqlException txtmsg.Text = err.Message Return End Try oCmd.Connection.Close() ' reload data so we refect what was actually saved LoadDataSet() dgCover.EditItemIndex = -1 FinishPage() dgCover.Visible = True End Sub and since there is no physical attributes it doesn't update when i do a quickwatch on DsCover.Tables(0).Rows(nIdx).RowState it states that it was unchanged don't know why :mad: :confused: :-\ webform1.aspx.vb
-
With oCmd oCmd.CommandText = "INSERT INTO dbo.Contributor(AuthorId,prefix,AuthorLast,AuthorFirst,IsPhotographer, Suffix)" _ & " VALUES(&@nCountedValue + 1,@uprefix,@ulast, @ufirst, @ddlistvalue, @usuffix) " .Parameters.Add("@prefix", uprefix) .Parameters.Add("@AuthorLast", ulast) .Parameters.Add("@AuthorFirst", ufirst) .Parameters.Add("@IsPhotographer", ddlistvalue) .Parameters.Add("@Suffix", usuffix) .Connection = DaContributor.SelectCommand.Connection End With
-
try dsdir.EnforceConstraints = False on top
-
Public Sub DgContributor_Update(ByVal Sender As Object, ByVal E As System.Web.UI.WebControls.DataGridCommandEventArgs) Dim uprefix As String = CType(E.Item.Cells(1).FindControl("ddlPrefix"), DropDownList).SelectedItem.Value Dim ulast As String = CType(E.Item.Cells(2).FindControl("txtlast"), TextBox).Text Dim ufirst As String = CType(E.Item.Cells(3).FindControl("txtfirst"), TextBox).Text Dim usuffix As String = CType(E.Item.Cells(4).FindControl("ddlSuffix"), DropDownList).SelectedItem.Value Dim uAuthorid As String = CType(E.Item.Cells(5).FindControl("lbid"), Label).Text Dim nIdx As Int32 = E.Item.DataSetIndex Dim oCmd As SqlClient.SqlCommand If DsContributor1.Tables(0).Rows(nIdx).RowState = DataRowState.Added Then oCmd.CommandText = "select max(AuthorId) from dbo.Contributor" oCmd.Connection.Open() Try oCmd.ExecuteNonQuery() Catch err As SqlClient.SqlException txtmsg.Text = err.Message Return End Try Dim nCountedValue As Int32 = oCmd.ExecuteScalar() With oCmd oCmd.CommandText = "INSERT INTO dbo.Contributor(AuthorId,prefix,AuthorLast,AuthorFirst,IsPhotographer, Suffix)" _ & " VALUES(&@nCountedValue + 1,@uprefix,@ulast, @ufirst, @ddlistvalue, @usuffix) " .Parameters.Add("@prefix", uprefix) .Parameters.Add("@AuthorLast", ulast) .Parameters.Add("@AuthorFirst", ufirst) .Parameters.Add("@IsPhotographer", ddlistvalue) .Parameters.Add("@Suffix", usuffix) .Connection = DaContributor.SelectCommand.Connection End With Else oCmd = DaContributor.UpdateCommand DaContributor.UpdateCommand.Parameters("@AuthorId").Value = uAuthorid DaContributor.UpdateCommand.Parameters("@prefix").Value = uprefix DaContributor.UpdateCommand.Parameters("@AuthorLast").Value = ulast DaContributor.UpdateCommand.Parameters("@AuthorFirst").Value = ufirst DaContributor.UpdateCommand.Parameters("@Suffix").Value = usuffix End If If oCmd.Connection.State = ConnectionState.Closed Then oCmd.Connection.Open() End If Try oCmd.ExecuteNonQuery() Catch err As SqlClient.SqlException txtmsg.Text = err.Message Return End Try oCmd.Connection.Close() ' reload data so we refect what was actually saved LoadDataSet() DgContributor.EditItemIndex = -1 FinishPage() End Sub
-
Setting SQL parameter to data Adapter
wayko replied to sethindeed's topic in Database / XML / Reporting
you can edit the command on the property or you can dim a new sqlcommand text