|
Source: http://community.livejournal.com/aspdotnet/56888.html
Date: 02/01/06 (Asp Dot Net) Keywords: database, asp
Ok I'm binding to a database using repeaters. I have 2 time fields in my database that show how long a course is, but those 2 fields aren't always used (ie 90-120 minutes or just 60 minutes.) I have the code set up like this:
Summary
Source: http://community.livejournal.com/aspdotnet/57483.html
Date: 02/02/06 (Asp Dot Net) Keywords: browser, database, sql, web
Assuming you're not all sick of me yet, I have another question.
I have 2 web pages. On the main page there are links that are binded to a database. Clicking on those links will open up another window that has more details about that particular topic. On that detail page I want to add a button that will close that detail window, then have the main page WINDOW go to a page that only shows courses available on that topic. That information would be accessed via a SQL Query.
So for example (because I'm sure this is very confusing,) on the main page you click on a link to learn more about the Manager Training course. A window comes up showing all the information about the Manager training course. You then click on a button. That detail window closes, and the main page goes to another page that only shows all the Managers Training Courses. My main question is how I can tell the main page window to go to this other page and pass the information needed so that it can query the database and bind the correct information to it. I know this is very easy if everything is in the same browser window, but I don't know how you do it with multiple windows. Thanks.
Source: http://community.livejournal.com/aspdotnet/57787.html
Date: 02/03/06 (PHP Community) Keywords: php, mysql, html, database, sql
I have the following login script when it logs in it just goes straight to back to the login page. Now I've worked out it's something to do with the else or if ( $num != 0) statement as when commented out it goes thru ish but it doesn't print the $msg variable which I have an echo statement calling on it in the html body..The session start/auth isn't being worked on atm hence why it's been commented out.
#set variables
$usr = $_POST['username'];
$pass = $_POST['password'];
$self = $_SERVER['PHP_SELF'];
/*#Start session and auth it
if (isset( $usr ) and isset( $pass ) )
{
session_start();
$_SESSION['authorized'] = 'ok';
$url = (isset($_GET['url'])) ? $_GET['url'] : 'index.php';
header("Location: $url");
}*/
#check form not empty
if ( (!$usr) or (!$pass) )
{
header ("Location:{$_SERVER['HTTP_REFERER']}");
exit();
}
#connect to sql db
$conn = @mysql_connect( "localhost", "xxx", "xxx" ) or die( "Could not connect to SQL" );
$rs = @mysql_select_db ( "xxx", $conn ) or die ( "Could not select database" );
#select db
$sql = 'select * from users where \'user_name\'=\'$username\' and \'password\'= password(\'$password\')';
#execute the query
$rs = mysql_query($sql, $conn) or die ( 'Could not execute query' );
#get no. of matching rows
$num = mysql_num_rows ( $rs );
#check for match
if ($num != 0 )
{
$msg = 'Welcome $usr - you are now logged in';
}
else
{
header ("Location:{$_SERVER['HTTP_REFERER']}");
exit ();
}
Date: 02/03/06 (Security) Keywords: database
Database giant is learning defensive moves from the more than one dozen companies it picked up in acquisition spree in the past year.
Date: 02/03/06 (Web Technology) Keywords: database, google
Google's vast database of its users' searches is a gold mine for police and curious divorce attorneys. It's just a matter of time.
Date: 02/03/06 (Asp Dot Net) Keywords: php, mysql, database, asp, sql, web, google, apache
Hey guys,
This is not an asp.net technical question, but I thought maybe someone here could help me out.
I need to switch web hosts. The one I have now has terrible customer service and thinks that it is normal to take the web server down for several hours every day, and not bother to tell their customers that they do so. I found them through Google and I don't want to try that again.
I've tried looking for recommendations elsewhere, but all the ones I've found have been for Apache web servers. I need an IIS web server that has: ASP.NET/ADO.NET and PHP4/5 supported, MySQL or SQL Server databases, along with the standard mail accounts, web statistics, ftp access, etc. It's just for a couple personal sites, so I don't need a lot of bandwith or space, just need reliable servers with little downtime and good customer service.
Any recommendations?
Source: http://community.livejournal.com/aspdotnet/57938.html
Date: 02/03/06 (MySQL Communtiy) Keywords: database
I'm working on a site for a medical/nutritional company with custom "client" and "admin" sections, each with a few different features; one thing I built in was a very simple messaging system for clients to communicate back and forth with staff members (kind of a mini-emailing system)
The way I initially set things up, I have information about staff users and client users stored in 2 different tables, as up until now they were 2 separate elements and I'm storing slightly different information on each;
What I'm thinking of doing now is expanding the messaging system to allow messaging between staff members as well (we just never thought of doing it until now) but I'm wondering which way I should change my database structure and thought I'd see if I could get some input
Currently I have my messaging and client/admin login setup roughly like this:
client
------
[clientID]
staff
-----
[staffID]
messages
--------
[msgID]
clientID
staffID
fromStaff (this is a 0/1 to determine who the message is to and who it is from)
I'm wondering if I should either add another table of messages to hold staff->staff messaging:
staff_mesages
-------------
[staffMsgID]
fromStaffID
toStaffID
subject
body
Or - throw all my logins into one table (client and staff users) and determine type by adding an extra access level for clients (I have multiple access levels in the staff end but only 1 client access level) and then do all my messaging like:
messages
--------
fromUserID
toUserID
message
subject
any suggestions?
Date: 02/04/06 (SQL Server) Keywords: software, database
I work for a software company and we have this huge query used for billing and it has not changed but in two weeks time this query takes a lot more time to run. It use to take 10-15 minutes and now it takes 3 hours to complete. Only a week or two worth of data has been added to this database which a customer has had for 2-3 years. I'm stumped on how this could happen. Is there a tool to test the data to see if the data is messing up the query (bad values in a column?) I've tried the execution plan but it wasn't much help in Query Analyzer. We are thinking about rewriting the query which would be good but if there is bad information in the database that would be good to find.
Thanks for any suggestions anyone may have.
Source: http://community.livejournal.com/sqlserver/42320.html
Date: 02/05/06 (PHP Community) Keywords: php, mysql, database, sql, apache
FIXED. Thanks to hipmaestro -- I downloaded PHP 4.3.11 and upgraded my installation, and it's fixed. :)
I've been working at this since last night -- and I'm quite clueless about what's happening. I was thinking that it could possibly be that my system has been working too long and there are weird memory leaks (yes, I have no more good ideas) so I thought I'd just go back in the morning... but now it's morning and the error is still there. The error is-- at some point of the script, a certain variable gets overwritten with the text of the next variable.
This is how the script is set up: there is a config file that's included all over the place -- in all the visible pages and in each function (I'm toying with the idea of using constants instead, but for now this is what I'm using). The config file has the database variables, and along the top I define the connection stuff:
$db_server = 'localhost';
$db_user = 'username';
$db_password = 'password';
$db_database = 'databasename';
echo '$db_user is now: ' . $db_user . '';
$db_server = 'localhost';
$db_user = 'username';
$db_password = 'password';
$db_database = 'databasename';
echo '$db_user is now: ' . $db_user . '';
Notice: Undefined variable: db_user in D:\Site\devt\Enth3\enth3\config.php on line 11
$db_user is now:
$db_user is now: password
Date: 02/06/06 (Computer Geeks) Keywords: php, technology, database, asp, sql, web
We currently have an application at my job that uses portlet technology (websphere as far as I know) in order to maintain an track an SQL database filled with articles pertaining to Marketing. It’s a lot of bells and whistles for something that can be easily coded and maintained using either PHP or ASP especially when the guy who is the admin of the application can’t even maintain it. Most of the upgrades and changes are done by another person and not the admin for the application; however, the admin is trying to justify the need for additional portlet technology. I have been asked to research the need and use of portals for our division due to budget cuts.
Currently, we are using MS SQL to develop and maintain databases and use ASP.NET in order to create and develop the webpages. We have a large audience, but the only about 5K of users depending on the application. The servers are running Windows 2000 as well. I would LOVE to have some resources that shows the pros and cons of using WebSphere, or if any of the members have any experience with WebSphere.
Source: http://community.livejournal.com/computergeeks/875901.html
Date: 02/06/06 (Web Development) Keywords: php, technology, database, asp, sql, web
We currently have an application at my job that uses portlet technology (websphere as far as I know) in order to maintain an track an SQL database filled with articles pertaining to Marketing. It’s a lot of bells and whistles for something that can be easily coded and maintained using either PHP or ASP especially when the guy who is the admin of the application can’t even maintain it. Most of the upgrades and changes are done by another person and not the admin for the application; however, the admin is trying to justify the need for additional portlet technology. I have been asked to research the need and use of portals for our division due to budget cuts.
Currently, we are using MS SQL to develop and maintain databases and use ASP.NET in order to create and develop the webpages. We have a large audience, but the only about 5K of users depending on the application. The servers are running Windows 2000 as well. I would LOVE to have some resources that shows the pros and cons of using WebSphere, or if any of the members have any experience with WebSphere.
Date: 02/07/06 (C Sharp) Keywords: database, sql, web
C# 2005 Express Edition.
Okay, quickest way to explain this situation: I have a DataGridView attached to a local Access database. The DGV pulls in three columns. My goal here is to get changes in the columns to update to the table automatically a la an open Access table window (or SQL Server Entierprise Manager or FoxPro or... you know). I started with the code in this CodeProject article.
The first change I've had to make to it is that it seems I have to instantiate the tableadapter before calling its Update() method. All well and good, though I'm not sure I did it correctly. Make the change, run again, and same result: I can change stuff to my heart's content in the DataGridView, but none of the changes are propagated to the database. I added the MessageBox you see in the UpdateRowToDatabase method; it never fires.
My question (again assuming I instantiated the tableadapter correctly): do I also need to instantiate the bindingsource? If so, how, because I can't find anything about it anywhere online or in the help files?
If not, can someone give me some idea of what it is I'm doing wrong? Thanks.
Problem solved, thanks to 109. Except for one oddity I'm going to go squash now...
EDIT2: bloody hell. I THOUGHT I had it...
sequence of events.
1. Fire up proggy.
2. Change a few rows, varying what I change in any given row.
3. With each change, event fires. (This is a major step forward, anyway.)
4. Close form.
5. Open form again (from the main form that calls it).
6. Look for changes. They are still there.
7. Exit program.
8. Start program again.
9. Open form.
10. Check for changes made when program was previously running... and they're not there.
(I've also gone in through Access and looked; the changes are not propagating.)
It looks as if the ThisCategoriesTableAdapter.Update(LastDa
Changes to the program code integrated below.
Thanks!
public partial class BrowseCategories : Form { categoriesDataSetTableAdapters.CategoriesTableAdapter ThisCategoriesTableAdapter = new categoriesDataSetTableAdapters.CategoriesTableAdapter(); //tracks PositionChanged event for last row private DataRow LastDataRow = null; public BrowseCategories { InitializeComponent(); } private void BrowseCategories_Load (object sender, EventArgs e) { this.parentsTableAdapter.Fill(this.parents._Parents); this.categoriesTableAdapter.Fill(this.categoriesDataSet.Categories); this.dgCategories.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.AllCells); //Is there a way to add an event handler from the design screen? categoriesBindingSource.PositionChanged += new EventHandler(categoriesBindingSource.PositionChanged); //Set LastDataRow initially, or if you try to change the first row, the event handler won't fire BindingSource thisBindingSource = (BindingSource)categoriesBindingSource; LastDataRow = ((DataRowView)thisBindingDource.Current)>Row; } private void UpdateRowToDatabase(); { if (LastDataRow != null) { if (LastDataRow.RowState == DataRowState.Modified) { ThisCategoriesTableAdapter.Update(LastDataRow); } } } private void categoriesBindingSource_PositionChanged(object sender, EventArgs e) { BindingSource thisBindingSource = (BindingSource)sender; DataRow thisDataRow = ((DataRowView)thisBindingSource.Current).Row; if (thisDataRow == LastDataRow) { throw new ApplicationException("It seems the PositionChanged event has fired twice for the same row."; } UpdateRowToDatabase(); LastDataRow = thisDataRow; } private void btnParent_Click(object sender, EventArgs e) { BrowseParent frmParent = new BrowseParent(); frmParent.Show(); } private void BrowseCategories_FormClosed(object sender, EventArgs e) { UpdateRowToDatabase(); } } } //I seem to have added an extra bracket... keeping it in case I screwed up the formatting somewhere. As I retyped it all, assume any typos are unique to this rendition. The code does run (it just doesn't update the database). EDIT:: as requested by 109 the InitializeComponent() method:private void InitializeComponent() { this.components = new System.ComponentModel.Container(); this.dgCategories = new System.Windows.Forms.DataGridView(); this.parentsBindingSource = new system.Windows.Forms.BindingSource(this.components); this.parents = new HospitalRates.Parents(); this.categoriesBindingSource = new System.Windows.Forms.BindingSource(this.components); this.categoriesDataSet = new HospitalRates.categoriesDataSet(); this.btnParent = new System.Windows.Forms.Button(); this.btnCorrect = new System.Windows.Forms.Button(); this.btnDone = new System.Windows.Forms.Button(); this.btnSave = new System.Windows.Forms.Button(); this.categoriesTableAdapter = new HospitalRates.categoriesDataTableSetAdapters.CategoriesTableAdapter(); this.parentsTableAdapter = new HospitalRates.ParentsTableAdapters.ParentsTableAdapter(); ///a word of explanation: the control below started out life as a text box column because ///I'm a forgetful bastard, and name hasn't changed because I'm lazy, as well. this.ParentsDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewComboBoxColumn(); this.CategoryDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.descriptionDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); ((System.ComponentModel.ISupportInitialize)(this.dgCategories)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.parentsBindingSource)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.parents)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.categoriesBindingSounrce)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.categoriesDataSet)).BeginInit(); this.SuspendLayout(); // //dgCategories // this.dgCategories.AutoGenerateColumns = false; this.dgCategories.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; ///note: I swear, there's no extra indentation here! this.dgCategories.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.parentDataGridViewTextBoxColumn, this.categoryDataGridViewTextBoxColumn, this.descriptionDataGridViewTextBoxColumn}); this.dgCategories.DataSource = this.categoriesBindingSource; this.dgCategories.Location = new System.Drawing.Point(14, 14); this.dgCategories.Name = "dgCategories"; this.dgCategories.Size = new System.Drawing.Size(739, 393); this.dgCategories.TabIndex = 0; // //parents // this.parents.DataSetName = "Parents"; this.parents.DataSchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema; // //categoriesBindingSource // this.categoriesBindingSource.DataMember = "categoriesDataSet"; this.categoriesBindingSource.DataSource = this.categoriesDataSet; // //categoriesDataSet // this.categoriesDataSet.DataSetName = "categoriesDataSet"; this.categoriesDataSet.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema; // //btnParent // this.btnParent.Location = new System.Drawing.Point(14, 432); this.btnParent.Name = "btnParent"; this.btnParent.Size = new System.Drawing.Size(135, 36); this.btnParent.TabIndex = 1; this.btnParent.Text = "Add/Edit Parent"; this.btnParent.UseVisualStyleBackColor = true; this.btnParent.Click += new System.EventHandler(this.btnParent.Click); // //btnCorrect // this.btnCorrect.Location = new System.Drawing.Point(215, 432); this.btnCorrect.Name = "btnCorrect"; this.btnCorrect.Size = new System.Drawing.Size(135, 36); this.benCorrect.TabIndex = 2; this.btnCorrect.Text = "Correct Existing Data"; this.btnCorrect.UseVisualStyleBackColor = true; // //btnDone // this.btnDone.Location = new System.Drawing.Point(617, 432); this.btnDone.Name = "btnDone"; this.btnDone.Size = new System.Drawing.Size(1356, 36); this.btnDone.TabIndex = 3; this.btnDone.Text = "Done"; this.btnDone.UseVisualStyleBackColor = true; // //categoriesTableAdapter // this.categoriesTableAdapter.ClearBeforeFill = true; // //parentsTableAdapter // this.parentsTableAdapter.ClearBeforeFill = true; // //parentsDataGridViewtextBoxColumn // this.parentsDataGridViewTextBoxColumn.DataPropertyName = "Parent"; this.parentsDataGridViewTextBoxColumn.DataSource = this.parentsBindingSource' this.parentsDataGridViewTextBoxColumn.HeaderText = "Parent"; this.parentsDataGridViewTextBoxColumn.Name = "parentDataGridViewTextBoxColumn"; this.parentsDataGridViewTextBoxColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True; this.parentsDataGridViewTextBoxColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; this.parentsDataGridViewTextBoxColumn.ValueMember = "Parent"; // //categoryDataGridViewTextBoxColumn // this.categoryDataGridViewTextBoxColumn.DataPropertyName = "Category"; this.categoryDataGridViewTextBoxColumn.HeaderText = "Category"; this.categoryDataGridViewTextBoxColumn.Name = "categoryDataGridViewTextBoxColumn"; // // descriptionDataGridViewTextBoxColumn // this.descriptionDataGridViewTextBoxColumn.DataPropertyName = "Description"; this.descriptionDataGridViewTextBoxColumn.HeaderText = "Description"; this.descriptionDataGridViewTextBoxColumn.Name = "descriptionDataGridViewTextBoxColumn"; // //BrowseCategories // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Windows.Drawing.Size(772, 515); this.Controls.Add(this.btnSave); this.Controls.Add(this.btnDone); this.Controls.Add(this.btnCorrect); this.Controls.Add(this.btnParent); this.Controls.Add(this.dgCategories); this.Load += new System.EventHandler(this.BrowseCategories_Load); ((System.ComponentModel.ISupportInitialize)(this.dgCategories)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.parentsBindingSource)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.parents)).EndInit(); ((System.ComponentModel.ISupportInitalize)(this.categoriesBindingSource)).EndInit(); ((System.ComponentModel.ISupportInitalize)(this.categoriesDataSet)).EndInit(); this.ResumeLayout(false); }Ah, the problem becomes clear... the event handler never registered...
Date: 02/08/06 (Web Development) Keywords: software, database, web
My friend Aaron's looking to hire a full-time software person; anyone here interested?
I was just happy that I was able to solve the puzzle! :-)
I'm not doing this for the money, but if he does hire you, my name is David Beroff. :-)
(Cross-posted to webdev, databases, perl, and d4b.)
Date: 02/10/06 (SQL Server) Keywords: database, sql
Hi all,
I'm new to SQL Server, I'm an Oracle developer but have been handed a project to convert some reports to run against a SQL Server database using Crystal Reports. Is there anyone here with experience in developing Crystal Reports against a SQL server database that I can bounce a couple of basic questions off?
Source: http://community.livejournal.com/sqlserver/42946.html
Date: 02/11/06 (WebDesign) Keywords: database, web
I'm going to be working with a graphic designer to revamp a website for a company and they've asked us to quote them a rate. They would prefer that we give them a set cost, not an hourly rate. I haven't done much freelance before and neither has she so I was wondering if any of you knew of a website or two that has good guidelines on doing this?
Basically none of the content is going to change, she's going to give it a facelift and I'm going to do the coding. They don't want anything too fancy, no Flash or database driven content, they're just wanting to update an out of date site. Without really counting, I would say the site consists of about 40-50 pages due to a lot of product descriptions. (I know, I know, but they have no interest in a database driven site...)
Any suggestions on reference materials or what you might charge for this?
Source: http://community.livejournal.com/webdesign/1058326.html
Date: 02/12/06 (PHP Community) Keywords: database
I need help with an updating script - it first selects the table which to update and selects the data (that part works fine), then it's supposed to update the data in the table when send, but there is the problem: it doesn't do anything when I hit "Send", it just gives me a success message but nothing has been updated in the database.
See the script here:
http://pastebin.com/550950
Thnx in advance :)
Date: 02/13/06 (Web Development) Keywords: php, database, asp, web, linux, microsoft, apache
I am responsible for implementing a new company intranet. I have experience setting up Drupal on my web host for my personal portfolio site, I set up the intranet on my G4 at work, but the Windows/IIS server causes all sorts of problems and the IT dept is unable to solve them, so there goes two weeks of work down the drain for me. I even asked them before I started if it was going to be a problem. Anyhow now they've set up Dotnetnuke and it is up but seems quite buggy, ie every 6th click results in a database error page. Yes I am definitely more of a front end designer and though I work mainly on Mac, by far an elitist (at least as far as OSs are concerned).
Just for my own knowledge, what would the advantages over using Windows/IIS server/ASP vs Linux/Apache/PHP?
A friend of mine suggests its just that most IT people learn the Microsoft stuff in school and that's what they stay with.
Any insight would be appreciated.
Date: 02/14/06 (Web Development) Keywords: mysql, database, asp, sql
Hey all,
I'm an idiot when it comes to ASP, just just starting, and don't know VBScript either (which is what this developer used). I'm trying to use some of his code for some other database functions to grab different data (which I've tried to modify it to get) but I don't know where I'm going wrong. It's in SQL, not MySQL, too. Any clues? I need to display a list of Transcripts, where the url is TranscriptURL and the Event Title is sEventTitle. Am I collecting the data wrong? Are the loops/connections messed up?
Anyone who doesn't feel like dealing with it can also just point me in the way of a quickstart ASP/VBscript guide, as well (online better).
Jess
Date: 02/15/06 (HTML Help) Keywords: browser, html, database, asp
hey i was wondering if anyone might be able to point me in the right direction.
heres the deal. im doing a contact/feedback form for a client. i have done it all in dreamweaver mx, using the forms. i have all that set up and if you click submit youll notice it should pop your email browser open and mail the data in the form to the client. actually i have not even had anyone test on a pc (im on a mac), so i wonder if it works.
heres the link:
http://www.btattersfielddesign.com/cont
anyway, im looking for a way to get this data from the feed back form into a database, so when the visitor submits the form, the data get zapped into a program or server. i have heard of cgi and asp.net, but not sure how to handle this part.
thanks for any tips.
Source: http://community.livejournal.com/htmlhelp/2259008.html
Previous page | || | Next page |