"Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints. "
We get this error when trying to fill a child table before filling the parent. Make sure you fill the parent table first.
Tuesday, November 30, 2004
Monday, November 29, 2004
CSK - Data, Data, Data
Although I haven't asked the question on the CSK forum yet, I am pretty sure that I am getting the "No communities configured" error because I have no data in the database. My options for getting data into the dataset are using a CSV import or generating SQL insert scripts.
I thought I would try the CSV import. I copied the records in the table into an excel spreadsheet, and then saved it as a CSV - comma delimited. That didn't work because some of the data in the fields had commas in them. Changed to a tab delimited fields. Some of the longer fields took too many cells, and I got a wrong number of column error.
I am now going to hack the admin login to see if I can bypass IsAuthenticated to get to an admin page to set up the database. Fun, fun, fun!!
I thought I would try the CSV import. I copied the records in the table into an excel spreadsheet, and then saved it as a CSV - comma delimited. That didn't work because some of the data in the fields had commas in them. Changed to a tab delimited fields. Some of the longer fields took too many cells, and I got a wrong number of column error.
I am now going to hack the admin login to see if I can bypass IsAuthenticated to get to an admin page to set up the database. Fun, fun, fun!!
Wednesday, November 24, 2004
The Case of the Disappearing DataSets
In the data tier component, when using multiple data adapters; sometimes datasets just disappear!!!! When you try to add them back in, you get crazy names like DataSet21, DataSet31, etc. First, edit your generated code to remove all references to these datasets. Also, kill the .xsd files in the project. Then, instead of right-clicking on the data adapter to create the dataset, right-click in the component window(not on any control). Believe it or not...this seems to work!
Missing information in Combo Box
If you are trying to fill a combo box with a dataview from your data tier component, make sure you have set the Table property of the dataview to the correct Table. Also, make sure that you are using the correct dataset that contains all the records you want to view.
So Close with the CSK
I kept fiddling with the Web.config file until I got a connection that worked. Now, I can get to the ISPAdministrator pages, and I can update the database!!!! :)
I get the default.aspx page which says I have no community set up (even though I do).
I compared the tables and procedures and found a few procedures that were wrong so I got them fixed.
Still don't have any sample data.
The default.aspx page suggests I reinstall the CSK. I still think there is a problem with starting out with a blank database.
I get the default.aspx page which says I have no community set up (even though I do).
I compared the tables and procedures and found a few procedures that were wrong so I got them fixed.
Still don't have any sample data.
The default.aspx page suggests I reinstall the CSK. I still think there is a problem with starting out with a blank database.
Wednesday, November 17, 2004
The CSK Saga Continues
The book came! Even though it was addressed to me in Indiana and I live in Iowa, somehow it arrived at my doorstep all the way from the UK! The book is Building Websites with the ASP.NET Community StarterKit by K. Scott Allen and Cristian Darie.
I immediately jumped to the chapter on Deployment. I guess that I want to get this to my site before I start customizing it.
Since I want to keep a little game I programmed, I was particularly interested in the "Working with Other Sites" section. With this help to modify the CSK, I added my little game and got it to run locally!
Now I changed my connection for the database, made sure debug was false in the Web.config, and did a Release of the program.
From the deployment chapter information, I installed Front Page Server Extensions to my web account and then did a Copy Project deployment from Visual Studio. WOW it all worked.
I am now getting this error Login failed for user 'HOSTING\WINHOST07$'. I think this is a success! I still have no data in the database -- and the error for that one procedure. I also found an ownership fix that won't run. The login failed at least told me it was trying to attach itself to the database!
Now I'm off to find out some way to get some data in the database -- at least the admin user account!
I immediately jumped to the chapter on Deployment. I guess that I want to get this to my site before I start customizing it.
Since I want to keep a little game I programmed, I was particularly interested in the "Working with Other Sites" section. With this help to modify the CSK, I added my little game and got it to run locally!
Now I changed my connection for the database, made sure debug was false in the Web.config, and did a Release of the program.
From the deployment chapter information, I installed Front Page Server Extensions to my web account and then did a Copy Project deployment from Visual Studio. WOW it all worked.
I am now getting this error Login failed for user 'HOSTING\WINHOST07$'. I think this is a success! I still have no data in the database -- and the error for that one procedure. I also found an ownership fix that won't run. The login failed at least told me it was trying to attach itself to the database!
Now I'm off to find out some way to get some data in the database -- at least the admin user account!
Tuesday, November 16, 2004
Having a problem with IE -- home page keeps changing
Try this Ad-Aware program. There is a free personal version. It worked great for me!
http://www.lavasoftusa.com/software/adaware/
http://www.lavasoftusa.com/software/adaware/
Wednesday, November 10, 2004
Web Page Design Considerations
Most web users use an 800x600 screen setting or higher. Try to make sure your web page will print on an 8 1/2 x 11" sheet of paper or offer the user an option for a more friendly print option without all the navigation of the web site.
Tuesday, November 09, 2004
Testing Programs
When testing a program, don't test it to see if it works; test it to see if you can break it! You want to have it break for you before you put it into production and it breaks on your client!
Deploying the CSK - Update
Well, I have access to my SQL Server remotely, and the host provider has already set up a database for me. Now I need to set up the tables and load some data. I used the Query Analyser to run the scripts found in the Setup folder of the CSK. Worked fine except one. Still trying to get that to work. Also, can not figure how to get the data in there to set up the admin account.
I don't think my permissions are set right on the dbo. My mappings are also probably wrong. I uploaded the code, and now I get a Runtime Error.
I have ordered a book specifically designed for the Community Starter Kit. Maybe it can shed some insight on how to get this deployed.
I don't think my permissions are set right on the dbo. My mappings are also probably wrong. I uploaded the code, and now I get a Runtime Error.
I have ordered a book specifically designed for the Community Starter Kit. Maybe it can shed some insight on how to get this deployed.
Tuesday, November 02, 2004
Let's Deploy the CSK to the Web!
From www.asp.net, I downloaded the Community Starter Kit (CSK). Wow! It uses multi-tier applications and builds web pages on one form. Neat programming techniques here. Well, I have some ideas on how I would like to use that so I found a web hosting site that supports ASP.NET and MS SQL. I purchased a domain name and a year's worth of hosting. I purchased the year's worth of hosting so that I could get the bargain rate! :)
I found that I could use the SQL Scripts supplied with the CSK to run in the Query Analyser of the MS SQL server. My web host allows me to connect remotely through a web interface.
I got all the 65 or so tables set up. Got all but one of the stored procedures set up. I keep getting an error Error -2147217900 "Line 45: Incorrect syntax near TRANSACTION." I had four stored procedures that were not set up, but I tried putting through the code again, and am now down to just one. It is the Community_VotingPollChoicesUpdateSortOrder.
I found that I could use the SQL Scripts supplied with the CSK to run in the Query Analyser of the MS SQL server. My web host allows me to connect remotely through a web interface.
I got all the 65 or so tables set up. Got all but one of the stored procedures set up. I keep getting an error Error -2147217900 "Line 45: Incorrect syntax near TRANSACTION." I had four stored procedures that were not set up, but I tried putting through the code again, and am now down to just one. It is the Community_VotingPollChoicesUpdateSortOrder.
Adding an Expression to the DataSet Schema
When you need information from a database in a format other than it is stored, you can create an expression to gather that information expressed in a new way. You do this through the DataSet Schema.
From the Solution Explorer, select the .xsd file. You should see a list of fields and their types. Scroll down to the last line of the table and click in the first column. Select E element from the list. Then type in your expression such as lastname + ', ' + firstname. Make sure you rebuild your solution. That field should now be available to use in databindings so you can display it on a form.
From the Solution Explorer, select the .xsd file. You should see a list of fields and their types. Scroll down to the last line of the table and click in the first column. Select E element from the list. Then type in your expression such as lastname + ', ' + firstname. Make sure you rebuild your solution. That field should now be available to use in databindings so you can display it on a form.
Subscribe to:
Posts (Atom)