Tuesday, March 27, 2012
ATTACH DB ERROR
I try to attach a database and the following error occurs:
Server: Msg 644, Level 21, State 5, Line 1
Could not find the index entry for RID '16a5eed57f3000300' in index page
(1:29375), index ID 8, database 'mat'.
26 transactions rolled forward in database 'mat' (10).
Connection Broken
Can anyone help me?The database was most probably corrupt when you detached it. Search the new
updated Books Online for
specific recommendations for your particular error number. consider opening
a case with MS Support.
Also, you might want to check http://www.karaszi.com/SQLServer/in...br />
t_db.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"koletsis theo" <koletsis theo@.discussions.microsoft.com> wrote in message
news:393BC089-3F37-4EBA-AA3D-66D51A6E9655@.microsoft.com...
> Hello
> I try to attach a database and the following error occurs:
> Server: Msg 644, Level 21, State 5, Line 1
> Could not find the index entry for RID '16a5eed57f3000300' in index page
> (1:29375), index ID 8, database 'mat'.
> 26 transactions rolled forward in database 'mat' (10).
> Connection Broken
> Can anyone help me?
>
>|||In addition , I'm sure you have last backup of the database.
"koletsis theo" <koletsis theo@.discussions.microsoft.com> wrote in message
news:393BC089-3F37-4EBA-AA3D-66D51A6E9655@.microsoft.com...
> Hello
> I try to attach a database and the following error occurs:
> Server: Msg 644, Level 21, State 5, Line 1
> Could not find the index entry for RID '16a5eed57f3000300' in index page
> (1:29375), index ID 8, database 'mat'.
> 26 transactions rolled forward in database 'mat' (10).
> Connection Broken
> Can anyone help me?
>
>
ATTACH DB ERROR
I try to attach a database and the following error occurs:
Server: Msg 644, Level 21, State 5, Line 1
Could not find the index entry for RID '16a5eed57f3000300' in index page
(1:29375), index ID 8, database 'mat'.
26 transactions rolled forward in database 'mat' (10).
Connection Broken
Can anyone help me?The database was most probably corrupt when you detached it. Search the new updated Books Online for
specific recommendations for your particular error number. consider opening a case with MS Support.
Also, you might want to check http://www.karaszi.com/SQLServer/info_corrupt_suspect_db.asp
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"koletsis theo" <koletsis theo@.discussions.microsoft.com> wrote in message
news:393BC089-3F37-4EBA-AA3D-66D51A6E9655@.microsoft.com...
> Hello
> I try to attach a database and the following error occurs:
> Server: Msg 644, Level 21, State 5, Line 1
> Could not find the index entry for RID '16a5eed57f3000300' in index page
> (1:29375), index ID 8, database 'mat'.
> 26 transactions rolled forward in database 'mat' (10).
> Connection Broken
> Can anyone help me?
>
>|||In addition , I'm sure you have last backup of the database.
"koletsis theo" <koletsis theo@.discussions.microsoft.com> wrote in message
news:393BC089-3F37-4EBA-AA3D-66D51A6E9655@.microsoft.com...
> Hello
> I try to attach a database and the following error occurs:
> Server: Msg 644, Level 21, State 5, Line 1
> Could not find the index entry for RID '16a5eed57f3000300' in index page
> (1:29375), index ID 8, database 'mat'.
> 26 transactions rolled forward in database 'mat' (10).
> Connection Broken
> Can anyone help me?
>
>
ATTACH DB ERROR
I try to attach a database and the following error occurs:
Server: Msg 644, Level 21, State 5, Line 1
Could not find the index entry for RID '16a5eed57f3000300' in index page
(1:29375), index ID 8, database 'mat'.
26 transactions rolled forward in database 'mat' (10).
Connection Broken
Can anyone help me?
The database was most probably corrupt when you detached it. Search the new updated Books Online for
specific recommendations for your particular error number. consider opening a case with MS Support.
Also, you might want to check http://www.karaszi.com/SQLServer/inf...suspect_db.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"koletsis theo" <koletsis theo@.discussions.microsoft.com> wrote in message
news:393BC089-3F37-4EBA-AA3D-66D51A6E9655@.microsoft.com...
> Hello
> I try to attach a database and the following error occurs:
> Server: Msg 644, Level 21, State 5, Line 1
> Could not find the index entry for RID '16a5eed57f3000300' in index page
> (1:29375), index ID 8, database 'mat'.
> 26 transactions rolled forward in database 'mat' (10).
> Connection Broken
> Can anyone help me?
>
>
|||In addition , I'm sure you have last backup of the database.
"koletsis theo" <koletsis theo@.discussions.microsoft.com> wrote in message
news:393BC089-3F37-4EBA-AA3D-66D51A6E9655@.microsoft.com...
> Hello
> I try to attach a database and the following error occurs:
> Server: Msg 644, Level 21, State 5, Line 1
> Could not find the index entry for RID '16a5eed57f3000300' in index page
> (1:29375), index ID 8, database 'mat'.
> 26 transactions rolled forward in database 'mat' (10).
> Connection Broken
> Can anyone help me?
>
>
Tuesday, March 20, 2012
Asterix not showing in report details
I have a report that shows a header, details and a footer
The detail line never prints lines with asterixes in them, e.g.
"**blah blah**"
As soon as I delete the asterix from the database, the line appears on the report
Any ideas anyone?
to clarifyare you saying:
you have a value in the database that contains the text "** blah blah **"
when you run the report, only "blah blah" is rendered in the row and not "** blah blah **"
?|||
It does not print the line at all, also additionally the problem seems to be caused only by the asterix at the start of the line
so when I would expect the report to show:
Header
detail1
detail2
*blah blah
detai*l4
Footer
The report actually omits the line "*blah blah" and prints this instead:
Header
detail1
detail2
detai*l4
Footer
|||Interesting... but I am not able to repro this in a simple case (ie an expression such as ="****" prints fine).
So here are some questions:
* -- does the disappearing line occur in all output targets? Or only some (such as HTML versus Excel)?
* -- what does the expression for your detail column look like?
>L<
|||To reproduce this you will have to query an sql database
The detail row of the table contains:
=Last(Fields!Case_SolutionNote.Value)
|||no, I still can't repro it. I tried a simple version (without the Last) and also one with a Last() function. I could see it fine.
What else do I have to know about your Case_SolutionNote field? What type is it? How long are the typical values? Can you post some example values (with and without * character)?
>L<
|||Interestingly, I also get a problem with the report's group footer section, it sometimes does not print at all either, I have not worked out why yet, but I suspect it is the presence of non alphanumeric characters in the relevant database field (which is an ntext data type)
I copied the contents of the field to notepad, deleted the contents of the field from the database, then used the 'update' statement (due to bug that prevents editing of ntext cells sometimes in microsoft sql server management studio) to repopulate it with a copy of the original text from notepad, it then shows on the report
I think there is a weakness somewhere in ntext data types in sql or reporting services relating to non alphanumeric characters
|||Oh, also...
When I delete the report's group header/footer, leaving just a basic report with detail lines, the original problem dissappears - lines with asterixes at the beginning of them appear!!
ie the report prints correctly, e.g:
detail1
detail2
*blah blah
detai*l4
also...
if i have a group header/footer present, the group footer will print lines starting with asterixes but the detail lines do not
|||When you copy the value of the field to Notepad and back, and then using the UPDATE statement you may not be preserving the Unicode characteristics of the string. It's hard to tell, because the clipboard buffer, the way you've stated the UPDATE, and the way the interactive query-handling facility in Studio would all be involved in interpreting that data <s>.
Point is, it is not a fair test...
>L<
|||I wish I could be absolutely sure that your report logic isn't doing something to influence is -- forgive me, I don't mean to doubt you -- it's just that you have the Last() function in there....
IOW, I can't tell whether the lines you're expecting are missing because of what you've pinpointed (the asterisk) or some other factor, such as the sort/group/whatever changing what Last() decides should come up.
Without repro'ing more of your exact scenario I can't debug, reproduce your error.. or otherwise offer advice... sorry
>L<
|||Hi thanks for you help
Regarding the second problem where the group footer was not displaying sometimes, I have worked around this by adding a space to the beginning of the data on the fly in the select statement in the report - note this only works in testing on sql server 2005 (unfortunately varchar(max) does not work in sql server 2000 where my database lives! )
ie i changed this:
select....., CaseProgress.Case_SolutionNote, .......
to
select....., (cast(' ' as varchar(max)) + cast(CaseProgress.Case_SolutionNote as varchar(max))) as Case_SolutionNote, .......
What this does is to populate the field if it was null in any rows - bear in mind i am using Last!(CaseProgress.Case_SolutionNote) and the last row is usually not empty but was not printing if prior rows had a 'null' in the field - wierd
The original problem with the aterix still stands
My hunch about alphanumeric characters was a red-herring i think
|||Actually a slightly better workaround for the second problem is:
select..,isnull(CaseProgress.Case_SolutionNote, ' ') Case_SolutionNote,...
|||
>>The original problem with the aterix still stands
Unfortunately I think I can't go any further to help without being able to repro.
I created a table with an ntext column. I replaced the data in each even-numbered row with "*" + the data. I used the Last() function. I tried it on a details level and a group level. Still worked.
I'd be willing to look at your report, if you thought it would do any good... but I still think it may be something data related, even though I don't know why or how...
>> My hunch about alphanumeric characters was a red-herring i think
Yes, I'm sure of that...
>L<
|||Fixed:
The filter on the detail line of the report was causing the problem, I changed the filter on the detail line to this:
=len(trim(Fields!Case_ProgressNote.Value)) > =0
(i.e. ignore blank entries)
note Case_ProgressNote.Value is ntext in the database, but by the time it gets to the layout it has been converted to text (the fact that it was ntext is irrelevant at this point)
Asterix not showing in report details
I have a report that shows a header, details and a footer
The detail line never prints lines with asterixes in them, e.g.
"**blah blah**"
As soon as I delete the asterix from the database, the line appears on the report
Any ideas anyone?
to clarifyare you saying:
you have a value in the database that contains the text "** blah blah **"
when you run the report, only "blah blah" is rendered in the row and not "** blah blah **"
?|||
It does not print the line at all, also additionally the problem seems to be caused only by the asterix at the start of the line
so when I would expect the report to show:
Header
detail1
detail2
*blah blah
detai*l4
Footer
The report actually omits the line "*blah blah" and prints this instead:
Header
detail1
detail2
detai*l4
Footer
|||Interesting... but I am not able to repro this in a simple case (ie an expression such as ="****" prints fine).
So here are some questions:
* -- does the disappearing line occur in all output targets? Or only some (such as HTML versus Excel)?
* -- what does the expression for your detail column look like?
>L<
|||To reproduce this you will have to query an sql database
The detail row of the table contains:
=Last(Fields!Case_SolutionNote.Value)
|||no, I still can't repro it. I tried a simple version (without the Last) and also one with a Last() function. I could see it fine.
What else do I have to know about your Case_SolutionNote field? What type is it? How long are the typical values? Can you post some example values (with and without * character)?
>L<
|||Interestingly, I also get a problem with the report's group footer section, it sometimes does not print at all either, I have not worked out why yet, but I suspect it is the presence of non alphanumeric characters in the relevant database field (which is an ntext data type)
I copied the contents of the field to notepad, deleted the contents of the field from the database, then used the 'update' statement (due to bug that prevents editing of ntext cells sometimes in microsoft sql server management studio) to repopulate it with a copy of the original text from notepad, it then shows on the report
I think there is a weakness somewhere in ntext data types in sql or reporting services relating to non alphanumeric characters
|||Oh, also...
When I delete the report's group header/footer, leaving just a basic report with detail lines, the original problem dissappears - lines with asterixes at the beginning of them appear!!
ie the report prints correctly, e.g:
detail1
detail2
*blah blah
detai*l4
also...
if i have a group header/footer present, the group footer will print lines starting with asterixes but the detail lines do not
|||When you copy the value of the field to Notepad and back, and then using the UPDATE statement you may not be preserving the Unicode characteristics of the string. It's hard to tell, because the clipboard buffer, the way you've stated the UPDATE, and the way the interactive query-handling facility in Studio would all be involved in interpreting that data <s>.
Point is, it is not a fair test...
>L<
|||I wish I could be absolutely sure that your report logic isn't doing something to influence is -- forgive me, I don't mean to doubt you -- it's just that you have the Last() function in there....
IOW, I can't tell whether the lines you're expecting are missing because of what you've pinpointed (the asterisk) or some other factor, such as the sort/group/whatever changing what Last() decides should come up.
Without repro'ing more of your exact scenario I can't debug, reproduce your error.. or otherwise offer advice... sorry
>L<
|||Hi thanks for you help
Regarding the second problem where the group footer was not displaying sometimes, I have worked around this by adding a space to the beginning of the data on the fly in the select statement in the report - note this only works in testing on sql server 2005 (unfortunately varchar(max) does not work in sql server 2000 where my database lives! )
ie i changed this:
select....., CaseProgress.Case_SolutionNote, .......
to
select....., (cast(' ' as varchar(max)) + cast(CaseProgress.Case_SolutionNote as varchar(max))) as Case_SolutionNote, .......
What this does is to populate the field if it was null in any rows - bear in mind i am using Last!(CaseProgress.Case_SolutionNote) and the last row is usually not empty but was not printing if prior rows had a 'null' in the field - wierd
The original problem with the aterix still stands
My hunch about alphanumeric characters was a red-herring i think
|||Actually a slightly better workaround for the second problem is:
select..,isnull(CaseProgress.Case_SolutionNote,' ') Case_SolutionNote,...
|||
>>The original problem with the aterix still stands
Unfortunately I think I can't go any further to help without being able to repro.
I created a table with an ntext column. I replaced the data in each even-numbered row with "*" + the data. I used the Last() function. I tried it on a details level and a group level. Still worked.
I'd be willing to look at your report, if you thought it would do any good... but I still think it may be something data related, even though I don't know why or how...
>> My hunch about alphanumeric characters was a red-herring i think
Yes, I'm sure of that...
>L<
|||Fixed:
The filter on the detail line of the report was causing the problem, I changed the filter on the detail line to this:
=len(trim(Fields!Case_ProgressNote.Value)) > =0
(i.e. ignore blank entries)
note Case_ProgressNote.Value is ntext in the database, but by the time it gets to the layout it has been converted to text (the fact that it was ntext is irrelevant at this point)
Asterix not showing in report details
I have a report that shows a header, details and a footer
The detail line never prints lines with asterixes in them, e.g.
"**blah blah**"
As soon as I delete the asterix from the database, the line appears on the report
Any ideas anyone?
to clarifyare you saying:
you have a value in the database that contains the text "** blah blah **"
when you run the report, only "blah blah" is rendered in the row and not "** blah blah **"
?|||
It does not print the line at all, also additionally the problem seems to be caused only by the asterix at the start of the line
so when I would expect the report to show:
Header
detail1
detail2
*blah blah
detai*l4
Footer
The report actually omits the line "*blah blah" and prints this instead:
Header
detail1
detail2
detai*l4
Footer
|||Interesting... but I am not able to repro this in a simple case (ie an expression such as ="****" prints fine).
So here are some questions:
* -- does the disappearing line occur in all output targets? Or only some (such as HTML versus Excel)?
* -- what does the expression for your detail column look like?
>L<
|||To reproduce this you will have to query an sql database
The detail row of the table contains:
=Last(Fields!Case_SolutionNote.Value)
|||no, I still can't repro it. I tried a simple version (without the Last) and also one with a Last() function. I could see it fine.
What else do I have to know about your Case_SolutionNote field? What type is it? How long are the typical values? Can you post some example values (with and without * character)?
>L<
|||Interestingly, I also get a problem with the report's group footer section, it sometimes does not print at all either, I have not worked out why yet, but I suspect it is the presence of non alphanumeric characters in the relevant database field (which is an ntext data type)
I copied the contents of the field to notepad, deleted the contents of the field from the database, then used the 'update' statement (due to bug that prevents editing of ntext cells sometimes in microsoft sql server management studio) to repopulate it with a copy of the original text from notepad, it then shows on the report
I think there is a weakness somewhere in ntext data types in sql or reporting services relating to non alphanumeric characters
|||Oh, also...
When I delete the report's group header/footer, leaving just a basic report with detail lines, the original problem dissappears - lines with asterixes at the beginning of them appear!!
ie the report prints correctly, e.g:
detail1
detail2
*blah blah
detai*l4
also...
if i have a group header/footer present, the group footer will print lines starting with asterixes but the detail lines do not
|||When you copy the value of the field to Notepad and back, and then using the UPDATE statement you may not be preserving the Unicode characteristics of the string. It's hard to tell, because the clipboard buffer, the way you've stated the UPDATE, and the way the interactive query-handling facility in Studio would all be involved in interpreting that data <s>.
Point is, it is not a fair test...
>L<
|||I wish I could be absolutely sure that your report logic isn't doing something to influence is -- forgive me, I don't mean to doubt you -- it's just that you have the Last() function in there....
IOW, I can't tell whether the lines you're expecting are missing because of what you've pinpointed (the asterisk) or some other factor, such as the sort/group/whatever changing what Last() decides should come up.
Without repro'ing more of your exact scenario I can't debug, reproduce your error.. or otherwise offer advice... sorry
>L<
|||Hi thanks for you help
Regarding the second problem where the group footer was not displaying sometimes, I have worked around this by adding a space to the beginning of the data on the fly in the select statement in the report - note this only works in testing on sql server 2005 (unfortunately varchar(max) does not work in sql server 2000 where my database lives! )
ie i changed this:
select....., CaseProgress.Case_SolutionNote, .......
to
select....., (cast(' ' as varchar(max)) + cast(CaseProgress.Case_SolutionNote as varchar(max))) as Case_SolutionNote, .......
What this does is to populate the field if it was null in any rows - bear in mind i am using Last!(CaseProgress.Case_SolutionNote) and the last row is usually not empty but was not printing if prior rows had a 'null' in the field - wierd
The original problem with the aterix still stands
My hunch about alphanumeric characters was a red-herring i think
|||Actually a slightly better workaround for the second problem is:
select..,isnull(CaseProgress.Case_SolutionNote,' ') Case_SolutionNote,...
|||
>>The original problem with the aterix still stands
Unfortunately I think I can't go any further to help without being able to repro.
I created a table with an ntext column. I replaced the data in each even-numbered row with "*" + the data. I used the Last() function. I tried it on a details level and a group level. Still worked.
I'd be willing to look at your report, if you thought it would do any good... but I still think it may be something data related, even though I don't know why or how...
>> My hunch about alphanumeric characters was a red-herring i think
Yes, I'm sure of that...
>L<
|||Fixed:
The filter on the detail line of the report was causing the problem, I changed the filter on the detail line to this:
=len(trim(Fields!Case_ProgressNote.Value)) > =0
(i.e. ignore blank entries)
note Case_ProgressNote.Value is ntext in the database, but by the time it gets to the layout it has been converted to text (the fact that it was ntext is irrelevant at this point)
sqlMonday, March 19, 2012
Assistance with error message
problem in line 3:
-
select ID, 9, '2004', (select id from type where type = 'MF') from Dept
where dept in ('Internal Medicine', 'Surgery')
and ID + (select id from type where type = 'MF') +
convert(varchar(2), 9) +
convert(varchar(4), '2004')
not in
(select m.deptID + m.typeid + convert(varchar(2), m.dtmonth) +
convert(varchar(4), m.dtyear) from monthdept m, dept d, type t
where m.DeptID *= d.ID
and m.TypeID *= t.Type
)
The error message is: Invalid operator for data type. Operator equals add,
type equals uniqueidentifier.
I have tried playing with CAST/CONVERT without success. I am trying to look
for records on a key that spans 4 fields. Any suggestions/thoughts?
Schoo
PS: SQL Server 2000 running on W2K Server
Hi Schoo,
From your descriptions, I understood that the following codes raise an
error in QA, correct me if I was wrong, however, when I copied codes you
provided to my QA and then Parse Query (Ctrl + F5), it passed. To make
further research on this issue, I would appreciated if you could provide me
detailed DDL of your database and some sample record for me to reporduce it
on my machine. One more question, have you upgraded to the latest SQL
Server Service Pack?
Here is the document on how to get DDL from Enterprise Manager
Please provide DDL and sample data.
http://www.aspfaq.com/etiquette.asp?id=5006
Thank you for your patience and corperation. If you have any questions or
concerns, don't hesitate to let me know. We are here to be of assistance!
Sincerely yours,
Mingqing Cheng
Online Partner Support Specialist
Partner Support Group
Microsoft Global Technical Support Center
Introduction to Yukon! - http://www.microsoft.com/sql/yukon
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only, many thanks!
Thursday, March 8, 2012
Assigning a particular flat file record to a string variable
Okay, can I assign line x of a flat file to a variable, parse that line, do my data transformations, and then move on to line x+1?
Any thoughts?
In other words, I'm looking at using a for loop to cycle through a flat file. I have the for loop set up, and the counter's iterating correctly. How do I point at a particular line in a flat file?
Thanks for any suggestions!
Jim Work
You could do this in the data flow using a script component to keep track of which row you are on....|||Phil, that sounds like a great plan. I am very, very, very new at this, though, and I could use a little more detail?
Going through a flat file line-by-line seems like it would be a very straightforward thing to me...
|||The data flow on its own operates on a row by row basis. That's what it's designed to do, and very fast, by the way.|||Oh, you're kidding me!
Thanks!!
Friday, February 24, 2012
aspnet_regiis on remote system
Sure, the subject line seems easy enough. But is there a way that I can run this tool against my local SQL 2k5 server and script out the objects it creates to try and set up the tables and what-not on a remote server that doesn't accept remote connections? Or is there maybe a pre-built script somewhere that you can point me to?
I've tried to grab the stored procs and tables under the aspnet schema and script them out but it's not working correctly. Still can't run my login form against it.
Thanks
Hello,
I think you mean aspnet_regsql.exe? If you run it on your own computer like this: aspnet_regsql.exe /? you will see all available options. In it you will read that it's possible to generate an SQL script file. You can then use this script file to create the tables.
Yes, I did mean the aspnet_regsql.exe. I gen'ed the script. THanks...
Thursday, February 9, 2012
Asp.net 2.0 Registration: Must declare the scalar variable @BillingAddress
I started to receive this error as soon I added the line"DataSource.SelectParameters.Clear()" Otherwise I was getting"variableuserid already decalred". I'm pasting the code below, please let meknow what I'm doing wrong. I think it is a minor problem.
1<%@. Page Language="VB" AutoEventWireup="false" CodeFile="Registration.aspx.vb" Inherits="Members_Registration" Trace="true" %>23<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">45<html xmlns="http://www.w3.org/1999/xhtml" >6<head runat="server">7 <title>Untitled Page</title>8</head>9<body>10 <form id="form1" runat="server">11 <div>12 <asp:CreateUserWizard ID="CreateUserWizard1" runat="server" BackColor="#FFFBD6" BorderColor="#FFDFAD" BorderStyle="Solid" BorderWidth="1px" Font-Names="Verdana" Font-Size="0.8em" OnCreatedUser="CreateUserWizard1_CreatedUser">13 <WizardSteps>14 <asp:WizardStep ID="CreateUserWizardStep0" runat="server">15 <table>16 <tr>17 <th>Billing Information</th>18 </tr>19 <tr>20 <td>Billing Address:</td>21 <td>22 <asp:TextBox runat="server" ID="BillingAddress" MaxLength="50" />23 <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator1" ControlToValidate="BillingAddress"24 ErrorMessage="Billing Address is required." />25 </td>26 </tr>27 <tr>28 <td>Billing City:</td>29 <td>30 <asp:TextBox runat="server" ID="BillingCity" MaxLength="50" Columns="15" />31 <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator2" ControlToValidate="BillingCity"32 ErrorMessage="Billing City is required." />33 </td>34 </tr>35 <tr>36 <td>Billing State:</td>37 <td>38 <asp:TextBox runat="server" ID="BillingState" MaxLength="25" Columns="10" />39 <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator3" ControlToValidate="BillingState"40 ErrorMessage="Billing State is required." />41 </td>42 </tr>43 <tr>44 <td>Billing Zip:</td>45 <td>46 <asp:TextBox runat="server" ID="BillingZip" MaxLength="10" Columns="10" />47 <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator4" ControlToValidate="BillingZip"48 ErrorMessage="Billing Zip is required." />49 </td>50 </tr>51 </table>52 </asp:WizardStep>53 <asp:WizardStep ID="CreateUserWizardStep1" runat="server">54 <table>55 <tr>56 <th>Shipping Information</th>57 </tr>58 <tr>59 <td>Shipping Address:</td>60 <td>61 <asp:TextBox runat="server" ID="ShippingAddress" MaxLength="50" />62 <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator5" ControlToValidate="ShippingAddress"63 ErrorMessage="Shipping Address is required." />64 </td>65 </tr>66 <tr>67 <td>Shipping City:</td>68 <td>69 <asp:TextBox runat="server" ID="ShippingCity" MaxLength="50" Columns="15" />70 <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator6" ControlToValidate="ShippingCity"71 ErrorMessage="Shipping City is required." />72 </td>73 </tr>74 <tr>75 <td>Shipping State:</td>76 <td>77 <asp:TextBox runat="server" ID="ShippingState" MaxLength="25" Columns="10" />78 <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator7" ControlToValidate="ShippingState"79 ErrorMessage="Shipping State is required." />80 </td>81 </tr>82 <tr>83 <td>Shipping Zip:</td>84 <td>85 <asp:TextBox runat="server" ID="ShippingZip" MaxLength="10" Columns="10" />86 <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator8" ControlToValidate="ShippingZip"87 ErrorMessage="Shipping Zip is required." />88 </td>89 </tr>90 </table>91 </asp:WizardStep>92 <asp:CreateUserWizardStep ID="CreateUserWizardStep2" runat="server">93 <ContentTemplate>94 <table>95 <tr>96 <th>User Information</th>97 </tr>98 <tr>99 <td>Username:</td>100 <td>101 <asp:TextBox runat="server" ID="UserName" />102 <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator9" ControlToValidate="UserName"103 ErrorMessage="Username is required." />104 </td>105 </tr>106 <tr>107 <td>Password:</td>108 <td>109 <asp:TextBox runat="server" ID="Password" TextMode="Password" />110 <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator10" ControlToValidate="Password"111 ErrorMessage="Password is required." />112 </td>113 </tr>114 <tr>115 <td>Confirm Password:</td>116 <td>117 <asp:TextBox runat="server" ID="ConfirmPassword" TextMode="Password" />118 <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator13" ControlToValidate="ConfirmPassword"119 ErrorMessage="Confirm Password is required." />120 </td>121 </tr>122 <tr>123 <td>Email:</td>124 <td>125 <asp:TextBox runat="server" ID="Email" />126 <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator11" ControlToValidate="Email"127 ErrorMessage="Email is required." />128 </td>129 </tr>130 <tr>131 <td>Question:</td>132 <td>133 <asp:TextBox runat="server" ID="Question" />134 <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator12" ControlToValidate="Question"135 ErrorMessage="Question is required." />136 </td>137 </tr>138 <tr>139 <td>Answer:</td>140 <td>141 <asp:TextBox runat="server" ID="Answer" />142 <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator14" ControlToValidate="Answer"143 ErrorMessage="Answer is required." />144 </td>145 </tr>146 <tr>147 <td colspan="2">148 <asp:CompareValidator ID="PasswordCompare" runat="server" ControlToCompare="Password"149 ControlToValidate="ConfirmPassword" Display="Dynamic" ErrorMessage="The Password and Confirmation Password must match."></asp:CompareValidator>150 </td>151 </tr>152 <tr>153 <td colspan="2">154 <asp:Literal ID="ErrorMessage" runat="server" EnableViewState="False"></asp:Literal>155 </td>156 </tr>157 </table>158159160 <asp:SqlDataSource ID="InsertExtraInfo" runat="server"161 ConnectionString="<%$ ConnectionStrings:Member %>"162 InsertCommand="INSERT INTO UserAddress (Userid, BillingAddress, BillingCity,BillingState,BillingZip, ShippingAddress,ShippingCity,ShippingState,ShippingZip) VALUES (@.userid, @.BillingAddress, @.BillingCity, @.BillingState, @.BillingZip, @.ShippingAddress, @.ShippingCity, @.ShippingState, @.ShippingZip)"163 SelectCommand="SELECT UserAddress.* FROM UserAddress">164 <InsertParameters>165 <asp:ControlParameter Name="BillingAddress" Type="String" ControlID="BillingAddress" PropertyName="Text" />166 <asp:ControlParameter Name="BillingCity" Type="String" ControlID="BillingCity" PropertyName="Text" />167 <asp:ControlParameter Name="BillingState" Type="String" ControlID="BillingState" PropertyName="Text" />168 <asp:ControlParameter Name="BillingZip" Type="String" ControlID="BillingZip" PropertyName="Text" />169 <asp:ControlParameter Name="ShippingAddress" Type="String" ControlID="ShippingAddress" PropertyName="Text" />170 <asp:ControlParameter Name="ShippingCity" Type="String" ControlID="ShippingCity" PropertyName="Text" />171 <asp:ControlParameter Name="ShippingState" Type="String" ControlID="ShippingState" PropertyName="Text" />172 <asp:ControlParameter Name="ShippingZip" Type="String" ControlID="ShippingZip" PropertyName="Text" />173 </InsertParameters>174 </asp:SqlDataSource>175176 </ContentTemplate>177 </asp:CreateUserWizardStep>178 <asp:CompleteWizardStep ID="CompleteWizardStep1" runat="server">179 </asp:CompleteWizardStep>180 </WizardSteps>181 <NavigationButtonStyle BackColor="White" BorderColor="#CC9966" BorderStyle="Solid"182 BorderWidth="1px" Font-Names="Verdana" ForeColor="#990000" />183 <HeaderStyle BackColor="#FFCC66" BorderColor="#FFFBD6" BorderStyle="Solid" BorderWidth="2px"184 Font-Bold="True" Font-Size="0.9em" ForeColor="#333333" HorizontalAlign="Center" />185 <CreateUserButtonStyle BackColor="White" BorderColor="#CC9966" BorderStyle="Solid"186 BorderWidth="1px" Font-Names="Verdana" ForeColor="#990000" />187 <ContinueButtonStyle BackColor="White" BorderColor="#CC9966" BorderStyle="Solid"188 BorderWidth="1px" Font-Names="Verdana" ForeColor="#990000" />189 <SideBarStyle BackColor="#990000" Font-Size="0.9em" VerticalAlign="Top" />190 <TitleTextStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />191 <SideBarButtonStyle ForeColor="White" />192 </asp:CreateUserWizard>193194 </div>195196 </form>197</body>198</html>199200 PartialClass Members_RegistrationInherits System.Web.UI.PageProtected Sub CreateUserWizard1_CreatedUser(ByVal senderAs Object,ByVal eAs System.EventArgs)Handles CreateUserWizard1.CreatedUserDim UserNameTextBoxAs TextBox =DirectCast(CreateUserWizardStep2.ContentTemplateContainer.FindControl("UserName"), TextBox)Dim DataSourceAs SqlDataSource =DirectCast(CreateUserWizardStep2.ContentTemplateContainer.FindControl("InsertExtraInfo"), SqlDataSource)Dim UserAs MembershipUser User = Membership.GetUser(UserNameTextBox.Text)Dim UserGUID UserGUID = User.ProviderUserKey Trace.Write("userid", UserGUID.ToString) DataSource.SelectParameters.Clear()' DataSource.InsertParameters.Clear() DataSource.InsertParameters.Add("UserId", UserGUID.ToString) DataSource.Insert()End SubEnd Class Maybe a typo..... Dim UserGUID? Should be Dim UserGUID as GUID? I think I had a problem with that parameters.clear method also, so I added a check to see if there are any parameters before clearing,
IfMe.UsersObjectDataSource.SelectParameters.Count > 0Then
Me.UsersObjectDataSource.SelectParameters.Clear()EndIf
Burl