OK, I have been trying to write a fairly simple app for days!
My background: I've been a programmer for 30 years, but when it comes to ASP.NET, all I have is a class I took years ago, and even though it was easy for me and I was top in the class, I've forgotten a lot.
However, 80% of my issues has arisen from using MySQL. It seems like MS just doesn't like using non-MS databases very much.
Everytime I run into a new issue, it takes me hours & hours to find a solution.
There was the issue of the SQLDataSource putting square brackets around all table & field names (just the way MSSQL likes it). I got that solved.
There still is the issue of it putting a ? instead of #param-name when building the update & insert queries. The only solution I found here was to go into the code and manually correct the queries.
I still can't get parameter queries to work.
And everytime I turn around, there's a new issue that seems to point me using MySQL. I no long believe the light I htink I see at the end of the tunnel.
Now, using a RAD environment I wasn't real familiar with, I fully expected this project to take me longer. Actually I budgeted for twice as long. But something that I could have whipped out in 1-2 days in VB6, has so far taken me 2 weeks in ASP.NET. I am way behind schedule.
So, my questions are:
Should I just give up on using MySQL and convert my DB to MSSQL?
Is there a 3rd party data source control that is more MySQL friendly?
I've googled this, but couldn't find any. I even looked at Telerik's Radcontrols, who told me that all I have to do is connect their controls to the built in MS SQLDataSource, totally ignoring where my issues lie.
Related
how are you. For a while I've been working for a Gynecologist building her a data base. For the project I am using Firebase and JavaScript. The database is for her to keep track of their patients and she keeps reports on each one of them. I am almost done with the job, the UI is almost finished, the core functionalities of the database (save data, delete, retreive, and update) are up and running but I am stuck in one little thing. She asked me for a way to turn those reports she keeps in the database into a format like PDF so she can print them and give them in case needed to her patients. The thing is that Ive tried with html2pdf, a git repository that works kind of clunky, and tried looking for others but I still cant find one that works correctly. So I wanted to ask you guys if you know of some alternatives. I started thinking about using EXCEl or Word document. But either way it seems quite complicated. Thank you for your time.
Best to all.
I am trying to hash out a strategy for implementing a very simple site search in ASP.NET MVC and SQL Server 2008.
Really, all I want to to do is to be able to rank search results based on the number of times a search word or phrase is found in the webpage. I attempted to do this using LINQtoSQL but I ran into a lot of issues where some LINQ commands don't have a SQL equivalent. This was a few months ago so I don't remember specific errors.
So, I'm just trying to figure out an approach. What I'm thinking is this:
Approach 1:
I should probably write a program to spider the site and somehow index the site's text - I'm thinking I should save information in a table like:
ID
Word
URL
I could then query that and rank based on how many time that word is associated with a certain URL. But then I realized that this technique would completely breakdown if a user was searching for a phrase.
Approach 2:
Then I was toying with the idea of using SPROCs to create a temporary table with a record for each URL that would somehow parse the text and determine how many times the phrase or word appeared in each individual URL. and then we would return the results from the temp table. I am thinking the temporary table would look something like this:
ID
SearchText
URL
Frequency
And then select * from temptable order by Frequency asc or something like that.
However, I'm not sure if SPROCs are capable of parsing text like that, or if simultanious searching would be possible.
I am looking for something very lightweight. I'm not really interested in using Lucene or Solr or anything like that because the learning curve seems very steep and those applications' features are far away more than what I need.
Any thoughts on how I should approach this problem? Is there a different approach that I should consider?
For your phrase versus word issue, why not use wildcards and LIKE operators?
Select Count(*) from temptable where SearchPhrase LIKE '%Apple%'
Maybe not exactly what you want, but Windows SharePoint Search Server isn't all that bad.
Yes, it has the word 'SharePoint' in it, which would usually make me grab the scissors on my desk and start stabbing my eyes out, but having to use it once in a pinch, I was actually somewhat impressed with it.
It's free, so maybe worth a couple of hours playing with it for comparison to writing something custom.
After a little poking around, it looks like SQL Server 2008's Full Text Search is what I would want to use. I'm not 100% sure yet, but it looks promising.
http://msdn.microsoft.com/en-us/library/ms142547.aspx
If you're considering Full Text Search, then also check out lucene.net.
I used FTS for one project, and later used lucene.net for another, and although the requirements were different from yours, I'd never go back to FTS now.
I've tried to do my homework on this...
I'm migrating a site from classic asp to asp.net 4.0
Before I rework all the code, I wanted to get clarification that the way i think my database code should be updated is fairly correct. (I'm using SQLClient objects)
First, when old code would use forward only recordsets or access single record/value, I'm fairly sure i'd use SqlCommand and SqlDataReader. That is pretty straightforward.
Now, when my old code navigates a recordset (movePrevious, find, etc.)... I believe the way to go is with SqlDataAdapter and DataTable to retrieve the data and DataView to filter/find/navigate the data.
I'n looking to do a quick migration... i don't want to get too bogged down in the new entity framework... so - just trying to stick with similar objects/logic.
I know this is one of those questions that doesn't really have a right/wrong answer... and I think that is part of my problem in finding an answer - there are so many.
Thanks,
bill g
I answered something similar here.
You only really need to know about the database bit here. For you it's a really good point to start as you mean to go on.
It terms of how deal with the data returned, it's up to you. I'd recommend custom class style dataset approach which will make life easier in the long run but of course in the short term, you'll have to generate them all which can be made easier by CodeSmith*. That in itself has an upfront cost but will, again, save time in the long run.
*Other code generation tools are available.
If your main issue is the database I propose to move and learn the Subsonic 2 (not subsonic 3, too slow) or any other DAL.
See here some examples:
http://subsonicproject.com/docs/Main_Page
Take some time to understand it, make some tests, see what really do, after wille you can't do with out it, but you need some time to understand the logic, and setup it to your project.
Get this project to play with and see some dal in action, ready to run.
This problem makes me really sad. I'm working with a pretty archaic web application with an eclectic mix of programming languages. Previously, it stored any and all datetimes in a Datetime field in our MySQL database. Until now, everything has been done in server time, which happens to be US/Pacific. I was tasked with adding "Timezone functionality" to the application. I have been pretty successful with converting most of the application.
My only remaining problems are the use of ColdFusion specific datetime functions. There appears to be many lines of code that use some of these functions. My ideal situation would be to be able to adjust the timezone on my Application.cfm page and not need to worry about the timezone for any of these functions. I've done quite a bit of searching and I can't seem to find anything. Any help would be awesome! Please let me know if I can provide any more details.
see: How to handle timezones in CFML?
I have reviewed DashCommerce, nopCommerce and DotShoppingCart for possible use and all of them seem to not allow any way to do bulk product/category/manufacturer/etc imports from existing data (DotShoppingCart seems to allow it only in the paid version).
The company I work for has some 30,000 products that we would need to load, and at least a thousand categories or so. Obviously this is ridiculous to have to manually type in, and as I've stated before in previous questions the company is insanely cheap and won't pay for software, so I need a free solution.
I don't have the time to roll my own solution by following the ASP.NET MVC Storefront series, or else I would just do that; My boss seems to think creating an online store is trivially simple (I had slapped together a Classic ASP site a few months back but we recently changed our primary vendor so I can't use most of it; it was pretty much hacked together anyway and I can't really use it without reworking a lot of it for the new supplier) and I don't want to hear him if/when I tell him I need a couple of months; he's already waited 90 days since he has some SEO expert on retainer to start blogging/marketing it and doesn't understand that writing software takes time, it's not something that can be thrown together in a week or even a month.
Is there anything out there that can meet these requirements? In a pinch I guess I could install DashCommerce or something and interrogate the database schema it creates to force an import myself to give him a quick solution that he seems to want.
It would take about 20 minutes to write a simple app that would connect to the database and insert the rows. All you need is a loop that reads a row, writes a row...