|
Try setting the breakpoint to the first line at the beginning of the Sub where this code is, then stepping through it one line at a time.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
After you delete the row from the dataset are you updating the table on the database? Datasets are disconnected from the database so you need to run some type of delete stored procedure to get the data out of the database. Otherwise you're just emptying your dataset without really doing anything. Sorry if that's a dumb question but I didn't see anything to this effect in the code you've provided.
-------------------------------------
Do not do what has already been done.
Absolute power corrupts absolutely.. but it ROCKS absolutely, too.
|
|
|
|
|
Nicholas,
The only other code I have is:
DataAdapter.Update(DataSet)
DataSet.AcceptChanges()
Wouldn't this force the Dataset to Update the Database via the DataAdapter?
(Also, these da and ds are created in the form designer and not hard coded, if that makes a difference)
Thanks for your help!
|
|
|
|
|
Well, I would check and make sure the delete command on your DataAdapter is correct. As has been discussed before if this is being called correctly then for some reason your deleted row from the dataset isn't updating properly to the database. On your DataAdapter there is a property for the DELETE command, look at this and make sure everything in it is correct for the database you're trying to update. If so then I would go with what you've been recommended thus far.
-------------------------------------
Do not do what has already been done.
Absolute power corrupts absolutely.. but it ROCKS absolutely, too.
|
|
|
|
|
The Text is as follows:
DELETE FROM dbo.Authors WHERE (AuthorID = @Original_AuthorID) AND (Address = @Original_Address) AND (City = @Original_City) AND (EMailAddress = @Original_EMailAddress OR @Original_EMailAddress IS NULL AND EMailAddress IS NULL) AND (Name = @Original_Name) AND (PhoneNumber = @Original_PhoneNumber OR @Original_PhoneNumber IS NULL AND PhoneNumber IS NULL) AND (State = @Original_State) AND (ZipCode = @Original_ZipCode).
So assuming the mdrRow parameter is passing this info correctly, I don't see why it wouldn't work.
|
|
|
|
|
Yeah. I don't see anything there that wouldn't work correctly. Something must be wrong with the row deletion in the dataset. Sorry I couldn't help you more Good luck!
-------------------------------------
Do not do what has already been done.
Absolute power corrupts absolutely.. but it ROCKS absolutely, too.
|
|
|
|
|
No problem thanks for your input.
|
|
|
|
|
Hi,
i want to create a multiple datasets and bind it seperately. the query will look like
select * from table where id=ID
now,
if id = 1,
i want to generate dataset1 just for records with id=1 and
if id = 2,
i want to generate dataset2 just for records with id=2 and so forth
so that i can bind those datasets to different web control say for webchart component or a datagrid.
******
my initial idea was something like
in page load,
select distinct id from table.
while dr.read
function(dr("id"))
end while
function (String id as parameter)
{
Create new webcomponent
Create new dataset based on id
Bind data with the new instance of webcomp and dataset
}
==> all i am doing this is to generating multiple web chart using a dataset.
******
Please note id can be any value from null to 100 and the select statement can return 0 to n records based upon id.
hope my question makes sense.
please help!!!
|
|
|
|
|
Get all the data you need into one DateSet, and use a DataView to filter out the data for each control.
---
b { font-weight: normal; }
|
|
|
|
|
after filtering out the data that i need how will i bind it to lots of datasets.
|
|
|
|
|
You don't need lots of datasets. Read the data from the DataView.
---
b { font-weight: normal; }
|
|
|
|
|
Hi,
i want to create a multiple datasets and bind it seperately. the query will look like
select * from table where id=ID
now,
if id = 1,
i want to generate dataset1 just for records with id=1 and
if id = 2,
i want to generate dataset2 just for records with id=2 and so forth
so that i can bind those datasets to different web control say for webchart component or a datagrid.
Please note id can be any value from null to 100 and the select statement can return 0 to n records based upon id.
hope my question makes sense.
please help!!!
|
|
|
|
|
Dear,
i am trying to Remaping keyboard layout with unicode Character keys VB6
but i have a problem
Please Help Me
M.Zain
|
|
|
|
|
What are you trying to do with this "remap"? It feels like just handling the KeyDown event of your form won't do it. More detail is needed to give you any kind of a usable direction...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-- modified at 7:07 Wednesday 1st March, 2006
|
|
|
|
|
Sir ,
I want to extract the icon of the folder and any extention of file programically . Please help me.
Thanks and Ragards
Pankaj Garg
|
|
|
|
|
the error is :
Keyword not supported: 'happyfam-b614e1\sqlexpress;initial catalog'.
it return nuthing to the connection.the code us :
Dim MyConn As New SqlConnection(ConfigurationManager.AppSettings("psmConnectionString2"))<br />
Dim MyCmd As New SqlCommand("sp_ValidateUser", MyConn)<br />
MyCmd.CommandType = CommandType.StoredProcedure<br />
Dim objParam1, objParam2 As SqlParameter<br />
objParam1 = MyCmd.Parameters.Add("@noPekerja", SqlDbType.VarChar)<br />
objParam2 = MyCmd.Parameters.Add("@pWord", SqlDbType.VarChar)<br />
objParam1.Direction = ParameterDirection.Input<br />
objParam2.Direction = ParameterDirection.Input<br />
objParam1.Value = textUsername.Text<br />
objParam2.Value = passwordTextBox.Text<br />
Try<br />
If MyConn.State = ConnectionState.Closed Then<br />
MyConn.Open()<br />
End If<br />
Dim objReader As Data.SqlClient.SqlDataReader<br />
objReader = MyCmd.ExecuteReader(CommandBehavior.CloseConnection)<br />
Catch ex As Exception<br />
lblMessage.Text = "Error Connecting to Database!"<br />
End Try<br />
<br />
please help me?
|
|
|
|
|
pandapatin wrote: whats wrong wif my connection?
Mebbe u spel it wong?
pandapatin wrote: Keyword not supported: 'happyfam-b614e1\sqlexpress;initial catalog'.
The error message is telling you what the problem is - you have a misconstructed connection string with what it thinks is an invalid keyword for the connection being attempted.
...Steve
"Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." (Translation: I'll show you the way, but not write the code for you.) I read that somewhere once
|
|
|
|
|
the spelling is ok,i've double check it.it is the same as my connection string as it in my web config file.So anything i can do to solve it?
|
|
|
|
|
pandapatin wrote: the spelling is ok,i've double check it.it is the same as my connection string as it in my web config file.So anything i can do to solve it?
Dim MyConn As New SqlConnection(ConfigurationManager.AppSettings("psmConnectionString2"))
This is the line it is crashing on right?
Make sure that whatever psmConnectionString2 contains is in the correct format and properly constructed.
Hint: Put the cursor on SqlConnection in the line above (in Visual Studio) and press F1.
...Steve
"Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." (Translation: I'll show you the way, but not write the code for you.) I read that somewhere once
|
|
|
|
|
do i need a datatable adapter with it?i dun know how to used it?
|
|
|
|
|
Your code is correct
May be u r wrong in placing the right connection string
In ur web.config what's the code that u r using for assigning psmConnectionString2
Just print psmConnectionString2 and Check ,If It's giving error or not
Nothing is Impossible Even Impossible says I'MPOSSSIBLE
|
|
|
|
|
in my web config :
<add name="psmConnectionString2" connectionstring="Data Source=HAPPYFAM-B614E1\SQLEXPRESS;Initial Catalog=psm;Integrated Security=True"
="" providername="System.Data.SqlClient">
how can i print the psmConnectionString2 and Check ,If It's giving error or not?
|
|
|
|
|
in my web config :
providerName="System.Data.SqlClient" />
It's not a valid connection string declaration
Please declare a vlaid connection string by generating connection string through typed dataset
Senior Software Engineer
Nothing is Impossible Even Impossible says I'MPOSSSIBLE
|
|
|
|
|
i cant understand what did u mean?could u show my what ur web config look like.
|
|
|
|
|
This is my web.config file
<configuration>
<appsettings>
<add key="connstring" value="data source=192.168.0.18;database=ABDATABASE;user id=sa; password=;">
<system.web>
<compilation
="" defaultlanguage="c#" debug="true">
<customerrors mode="Off">
<error statuscode="404" redirect="errormsg.aspx">
<authentication mode="Windows">
<authorization>
<allow users="*">
<trace
enabled="false"
="" requestlimit="10" pageoutput="false" tracemode="SortByTime" localonly="true">
<sessionstate
="" mode="InProc" stateconnectionstring="tcpip=127.0.0.1:42424" sqlconnectionstring="data source=127.0.0.1;Trusted_Connection=yes" cookieless="false" timeout="20">
<globalization
="" requestencoding="utf-8" responseencoding="utf-8">
Senior Software Engineer
Nothing is Impossible Even Impossible says I'MPOSSSIBLE
|
|
|
|