Could Not Add The Entry...
Can someone please help me solve the following error? I am not sure of the version my hosting company is using and where to get the manual.
Could not add the entry because: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '-id, title, entry, date_entered) VALUES ('testing', 'testing', . The query was INSERT INTO blog_entries (blog-id, title, entry, date_entered) VALUES ('testing', 'testing', 'testing'.
PHP Code:
if ($dbh = mysql_connect ('localhost', 'blu6592_money', 'rich')) {
print '<p>Successfully connected to MySQL.</p>';
if (mysql_select_db ('blu6592_myblog')) {
print '<p>The database has been selected.</p>';
} else {
die ('<p>Could not select the database because: <b>' . mysql_error() . '</b></p>');
}
$query = "INSERT INTO blog_entries
(blog-id, title, entry, date_entered)
VALUES (0, '{$_POST['title']}',
'{$_POST['title']}',
'{$_POST['entry']}', NOW())";
if (mysql_query ($query)) {
print '<p>The blog entry has been added.</p>';
} else {
print "<p>Could not add the entry because: <b>" . mysql_error() . "</b>. The query was $query.</p>";
}
} else {
die ('<p>Could not connect to MySQL because: <b>' . mysql_error() . '</b></p>');
}
mysql_close();
Thanks in advance.
View Complete Forum Thread with Replies
Related Forum Messages:
Last Entry In A Log
(I don't post here often, so in case I'm violating long-standing taboosof this newsgroup, I apologize in advance for calling a relation atable, using nulls, and other ignorant, destructive, and comtemptibleterminology.)I have a table that's keeping a sort of running log of different typesof changes to pieces of data. The table has a foreign key of the databeing changed, the foreign key for the type of change occuring, someinformation about the change in a couple more columns, and a timestampfor each entry. So it's:dataIDeventIDeventInfotimestampWhat I'd like to do, if at all possible, is a single SQL query that,given a dataID, returns the most recent eventInfo and timestamp foreach eventID. Is this possible?Many thanks.-Eric
View Replies !
Data Entry
We are into BPO and Software development business for past six and half years. We are looking for the following any kind of business from your end. Back Office Process Data Entry, Large Volume Data Processing, Data Conversion, Forms Processing, Process flow & Quality Data Entry Text, Numeric or Alphanumeric entry, Printed or Handwritten matter, Hardcopies or Scanned Images, Some typical examples include, Mortgage Documents, Abstract records, Index cards, Market Research Tabulations, Various different forms, Guest/Customer comment cards, Property tax records, Accounting and Book keeping, Extracting data from Catalog, Payroll Services, Dictionaries, Manuals, Encyclopedia etc,Surveys,Questionnaires,Company reports, Material Safety Data Sheets (MSDS) forms, Airway Bill entries Large Volume Data Processing Formatting of Data like mailing list, Database creation and updation,Data Conversion,OCR Clean up, ICR, OMR,Scanning from hardcopies, microfilms, microfiche,Indexing,Archiving,PDF conversion: PDF to text, HTML etc,HTML conversion, XML tagging, Document conversion Forms Processing Credit Card Processing, Insurance Claims Processing, Market Research forms entry, Survey Forms Processing, Order Processing Financial Services Accounts Payable Management, Accounts Receivable Management, Account Setup, Account Reconciliation, Bank Reconciliation, Bookkeeping, Financial Statements Financial/Operational Budget, Payroll Services, Prepare and File Tax Returns, US GAAP Reporting Drafts Contact COMPUTER CONSULTANCY SERVICES INC, URL: www.ccsgroupindia.com Email: jobs@ccsgroupindia.com, (24 x 7 online support) Chat MSN : rajamanickam73@hotmail.com Chat Yahoo: rajamanickam73@yahoomail.com Tel: +91 44 42037794, 42037795
View Replies !
Error Log Entry
I keep getting this message in my error logs. I can't find any references to it in Books online. Does anybody know what this error is? "dbswritecheck: Read of first trailer failed"
View Replies !
Duplicate Entry
Hi All, I have a table with name C1_Subscribers with three fields (1)-MobileNumber [varchar] (2)-ReceivedTime [datetime] (3)-Status [char]. Now here how to remove duplicate entry of same mobile number to MobileNumber field? Regards Shaji
View Replies !
Anyone Know What Causes This Error Log Entry?
"High priority system task thread: Operating system error Exception 0xAE encountered." we are seeing this on one of our development servers, running SQL 2005 Enterprise SP1. The symptom is that after the sql service has been running a while (order of days), this error starts getting written to the sql server log file over and over, and eventually the logfile fills the drive. Apparently it's fixed by this hotfix, but our ops team doesn't want to install this - they'd rather just cycle the service and delete the log when it happens. I was wondering if anyone else has seen it might know the root cause so we might be able to workaround it without cycling the service. I know, lame question. The correct answer is "install the hotfix" or "install sp2" but our ops team won't do that for now... www.elsasoft.org
View Replies !
Automatic Field Entry
Hi,I'm creating a database using SQL Server 2005 Express Edition (Comes with Visual Web Developer). The table which I am creating has the following Fields - all don't allow nulls:IDUserIdDateDescription(UserId is a foreign key to asp_net_Users as I am supporting user accounts)Basically what I need to do is create a page where I as an Administrator can log onto and enter just the text for the field Description. Then once I upload this I wish all users to visit the site and view this Description on a page however with it also listing the Administrator who wrote it along with the Date. I wish both of these fields to be added automatically (UserId to display the User Name and the Date to display the date and time with which the Description was added - However these need to be editable by the Administrator if he/she wishes to change them).Can anyone point me in the right direction on the steps needed to create this scenario?Thanks for any helpDaniel
View Replies !
DateTime From Database Entry
Hi, I know this is probably very simple but I am pretty new to this and have tried looking but cant seem to get the search criteria right. I have a database with a storeDate field which is of shortdatetime type. I am connecting to the database (MSSQL) via a stored procedure and returning all the records. I then use the code foreach (DataRow dr in ds.Tables[0].Rows) { DateTime dtTo = DateTime.Now; DateTime dtFrom = DateTime.Parse(dr["storeDate"].ToString()); TimeSpan diff = dtTo.Subtract(dtFrom); } I am basically trying to find out the age of the database entry by subtracting it from the current DateTime so i can delete records over a certain age. The problem (at least one of them!) is retrieving the "storeDate" object from the database and storing it in the dtFrom object. I have tried just assigning it directly as dtFrom = dr["storeDate"] and various other methods but I just don't know enough to assign it! Can anyone help me with this or spot any other mistakes in this process of removing old files automatically. Greatly Appreciated,Sean.
View Replies !
Verifying Entry Is Not In DB B4 Inserting
How do i do that... in sch lab, the lecturer said: Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Try SqlDataSource2.SelectParameters("Title").DefaultValue = txtProductTitle.Text GridView1.DataBind() If GridView1.Rows.Count > 0 Then //if no repeated Label1.Text = "Existing Record Found. Please enter another Software." Else 'SqlDataSource1.Insert() 'Label1.Text = txtProductTitle.Text & " successfully added to the database." End If Catch ex As Exception Label1.ForeColor = Drawing.Color.Red Label1.Text = "An error occured!" & ControlChars.NewLine & ControlChars.NewLine & _ ex.Message.ToString() End Try End Sub but its not working for me... the GridView1.Rows.Count is always 0, if there is a repeat, it should be > 0
View Replies !
Selecting First Entry In Results By Name
Hello, I have a table of names/dates as such: Class 1 1/1/2007Class 1 1/3/2007Class 1 1/5/2007Class 2 2/1/2007Class 2 2/3/2007Class 3 3/1/2007 What I want to do is select only the nearest entry from the list for each distinct class, so the results are like this: Class 1 1/1/2007Class 2 2/1/2007Class 3 3/1/2007 So basically, I want the first upcoming class in the list for each distinct class name. How do I do this? I'm using SQL 2005 Express. Thanks.
View Replies !
Identical Database Entry Already?
Here's some code that says it should identify if a user already exists in my database. I have changed the code to match my database, but it seems to have somewhat the opposite affect, rejecting all names (even new ones) or accepting all names (including existing ones). The switch in situations occurs in the "if" statement towardsd the end, when I change the sign of objDR.RecordsAffected. Do you have any idea what could be wrong? Thanks. Function DoesUserExist(ByVal userName As String) As Boolean Dim connectionString As String = "server='(local)Netsdk'; trusted_connection=true; Database='AuthorizedUsers'" Dim sqlConnection As System.Data.SqlClient.SqlConnection = New System.Data.SqlClient.SqlConnection(connectionString) Dim queryString As String = "SELECT [Users].[UserName] FROM [Users] WHERE ([Users].[UserName] = @UserName)" Dim sqlCommand As System.Data.SqlClient.SqlCommand = New System.Data.SqlClient.SqlCommand(queryString, sqlConnection) Dim Cmd as New SQLCommand(queryString, sqlConnection) With Cmd.Parameters .Add(New SQLParameter("@username", username)) End With sqlConnection.Open Dim blHasRows As Boolean Dim objDR As System.Data.SqlClient.SqlDataReader = Cmd.ExecuteReader(system.data.CommandBehavior.CloseConnection) if objDR.RecordsAffected > 0 then blHasRows="True" else blHasRows="False" End If Return blHasRows End Function
View Replies !
Could Not Find The Index Entry For RID...
Greetings. Today I was testing the sql backup/restore functions on ourprimary server. I was able to backup my database without any problemsbut when I tried to restore it, I received an error "Could not find theindex entry for RID '3610200101a03cc4b49d8bbc84bac50cbe042cecf76' inindex page (1:40), index ID 0, database 'walkthrough'." Thinking thatdata had been corrupted somehow I tried another database and received asimilar error for that database. In the past, our service provider hasattempted to restore data to this server and the restore failed do toanother data corruption. The problem is, I can't find out where thecorruption is located or how to fix it.When I open the restored database in enterprise manager, it returns theabove error and is unable to get a listing of my tables. In queryanalyzer I am able to view my data but receive the index error when Iattempt to look at the information_schema data. When I try to run a DBCCCHECKDB on the corrupted database it reports 0 errors and 0inconsistencies.So my diagnosis of the problem is that something is corrupting my systemtables and that problem shows up whenever I try to restore data from abackup. There could be a hardware failure but I believe the failurewould affect more then just the sql system tables. Can anyone offer anyadvice on how to find the corruption?Thank you in advanceRichard Bailey*** Sent via Developersdex http://www.developersdex.com ***
View Replies !
Query Every Entry Not In Each Hour
Hello,I have been having a tough time writing the follow requirement for aquery.On a table that the primary key is a tagId and an hourly timestamp, Iwould like to find out for every hour which tags did not get enteredinto the database. Essentially I am looking for patterns of entriesthat are not making it into tableB.Examples of the tables:TableA TableBTagID and TagName TagId TimestampPK PK1 PK2approx 6000 rows approx 6000 rows per hourI am thinking that I will need to do something like:Select tableB1.time, count(*) from tableB1 group by tableB1.timehaving tableB1.time >= XXXX and tableB1.time <= XXXX and tableB1.tagIdnot in (select tagId from tableA where not exists (selecttableA.tagId, distinct.tableB2.time from tableB2)I have been trying to create an effecient query handle this but havenot had any luck. Any assistance would be more then appreciated.Thanks,Andy
View Replies !
Overwriting Entry In Table
Task: To insert entries into a table. The table has a primary key based on a field 'ID'. When inserting into the destination table, I want to make sure that the new entry will overwrite the old entry. What's the quickest/cleaniest way to do this ? thanks, Clayton
View Replies !
Number Of Entry Query.
MSSQL2K SP4 Howdy all. Im trying to write a query that will track a data modification grouped by employer ID and transaction date. I don't know if Im asking it right so here is what I have, plus my current and desired outputs. --drop table #foo create table #foo (empID int, transDate datetime, transType varchar(10)) insert into #foo values(1, '01/01/06 01:01:01','Insert') insert into #foo values(1, '01/01/06 01:01:02','Update') insert into #foo values(1, '01/01/06 01:01:03','Delete') insert into #foo values(2, '01/01/06 01:01:01','Insert') insert into #foo values(2, '01/01/06 01:01:02','Update') select f.empID, Change = (select count(transDate) from #foo f2 where f2.empID = f.empID group by empID), f.transDate, f.transType from #foo f Current results: 132006-01-01 01:01:01.000Insert 132006-01-01 01:01:02.000Update 132006-01-01 01:01:03.000Delete 222006-01-01 01:01:01.000Insert 222006-01-01 01:01:02.000Update Desired results: 112006-01-01 01:01:01.000Insert 122006-01-01 01:01:02.000Update 132006-01-01 01:01:03.000Delete 212006-01-01 01:01:01.000Insert 222006-01-01 01:01:02.000Update TIA, CFR
View Replies !
System DSN Entry Does Not Show Up
I am installing a product that sets up a System DSN entry for an added database. The problem is that it does not show up in the ODBC - System DSN group as it should. If I try to add it manually, the system tells me that it already exists. I try to overwrite it, which seems to work, but the entry still does not show up. Is there a place I can "clear" out the entry from beside that panel in the odbc administrator? If I try to user the application to access the data, it does not find it under the local system. If I plug in the server ID from the server manager, I do see the data source and can log onto the system. So, the connection is there, but ODBC Data Source Admin does not see it and the application does not see the server as Local. Any suggestions?
View Replies !
&<Long Text&> Entry
Hi all, Newbie here, just wanted to get that out of the way first and foremost. Im trying to set up a DB in SQL 2000 that allows me to enter lots of text into a column. I read one site where it said to use the NTText datatype with a length of 16. I did that, but everytime I enter alot of text into that column I get <Long Text> and I dont know how to output that or even read it. Do any of you guys know how to either: 1. get the text out of the <long text> or 2. a better way to store that much data. Thank you in advance!!! REZ
View Replies !
Could Not Locate Entry In Sysdatabases
Hey there, could someone please help me!! I had created a database in sql server but since then installed windows xp pro and now when i go through the microsoft sql server dsn configuration the database is not valid and therefore i cannot change the default database as it says it doesn't exist. So then when i type in command prompt use 'db' it says it doesn't exist but when i try to create 'db' it says that the database already exists. I get the error message, could not locate entry in sysdatabases for 'cti' (database name). When i look in mysql - data - along with master etc there is my cti.mdf and log files?? I'm stuck??? Is it that the files just aren't registering through sql server??? Please help!
View Replies !
MULTIPLE ENTRY FORMS
I WOULD LIKE TO MAKE A MULTIPLE ENTRY FORM IN ACCESS, I HAVE BEEN TOLD THIS IS NOT POSSIBLE. I NEED TO BE BE ABLE TO ENTER A SSN AND EDIT A FIELD IN A TABLE, BUT I NEED TO HAVE IT PROMPT EVERYTIME FOR THE SSN. KELLY HOBBS
View Replies !
Select Last Entry Per Category?
Hello, I am trying to select the last entry (by date) for each category in a table. For example, if my table had the following fields; id, category, product, datePosted,.... ...how would I select the last product for each category posted by date? Any guidance is appreciated. Thanks, AC Probably a simple solution, but can't find it my brain right now!
View Replies !
NULL Entry In Lookup
Hi, In my Integration Scenario I have a source field 'CompanyTypeCode' which is nullable in 'tblCompany' and There is a specific lookup Table 'tblCompanyType' to map the codes with descriptions for this field. When I want to transform this table, The NULL Entries fail in Lookup and I ran into problem. Please suggest a clean solution for bypassing the lookup when the entry in source is NULL. (If I bypass the lookup, the flow changes since there is not an extra column from the lookup component any more, therefore I must have another OLEDB Destination if the code is NULL). Regards, Sassan
View Replies !
Null Entry In The Database
I am using a script component to retrieve some values from a server. This script component using Script task which uses VB.NET code. I have tested the VB.NET code and it returns a non null value for a string field 'sentence'. The 'sentence' feild is then passed on to an OLE DB Command transformation to be stored into the database along with a couple of other feilds. The OLE DB Command transformation uses a stored procedure to store these feilds into the database. But when I check my table in the database, all other feilds are stored properly other than the 'sentence' feild which is null. I am wondering what could be causingthis problem. Thanks
View Replies !
Determining Last Entry ID In Table
Not sure if this is the right place to post this but hopefully someone can help me. I would like to determine what the last automatically incremented ID is in a table I need to return it as a variable to a VB.NET program but I'm not sure what the SELECT statement would look like for this. Any help would be greatly appreciated.
View Replies !
Parameter Entry On A Report
I'm trying to graduate from Access to SQL and am finding that Access is still meeting my needs better than SQL. So, I figure I'm doing something wrong. In Access, I have queries that contain parameters. So far, I've gotten SQL to accept parameters, using =@prompt. But, this seems to be a limited parameter capability. Number one, I can't use a phrase for a prompt. Number 2, I can't do something like Access' Between [upper] And [lower]; I've not found away to use parameters as bounds in SQL. Any help?
View Replies !
Deleting An Entry During Run-time
I am trying to delet a row duing run-time but everytime i go to save the program I get an error message saying: "Update Requires a valid DeleteCommand when passed DataRow collection with deleted row. Anyone any ideas?
View Replies !
Table Entry Problem
While i execute the below query ,Entry is put in status_report table.But the same if i put in scheduling (Sql Agent) no entry is made in the table and the message success is shown in "Agent Job Activity". Purpose of the sp is to transfer data from One Server to Another Server. But if see in the Destination Tables No entry is made. CREATE procedure RBI_Control_sp as begin set nocount on begin try BEGIN TRANSACTION insert into fin_wh..Status_report ( [object_name], row, st_date ) select 'Data Tranfer', 'Inprogress--', getdate() --Data Transfer From the Live Server [RamcoFin02(scmdb)] to Dw-Server[Ramcovm392(fin_ods)] exec fin_ods..RBI_Data_Transfer_sp --temp table Table population,Fetching data from the fin_ods[erp Table] exec FIN_wh..RBI_SPExecution_sp Update fin_wh..Status_report set row= 'Success', [error_message] = 'No Error', end_date= getdate() where row= 'Inprogress--' COMMIT TRANSACTION end try begin catch ROLLBACK TRANSACTION Update fin_wh..Status_report set row= 'Failure', end_date= getdate(), [error_message]= cast(error_number() as varchar) + '***' + error_message() where row= 'Inprogress--' end catch set nocount off end Txs in advance
View Replies !
How To Make A Date Entry
First, let me say I'm really new (and probably dangerous) with SQL. I want to take a column in my database called "publish_up" and add 4 days to the date and put it in a column in the database called "publish_down." The publish_up date is the date to start publishing and the publish_down is the date to stop publishing. A Joomla! mambot will then come by and archive the items with a publish_down date that matches today's date. I'm pretty sure my server has SQL 5 if that's an issue. Thanks for any advice or help you can offer.
View Replies !
Automating Data Entry Into TM.PTA.00 Or Any Other
question... i heard a bit about Control Macro Generator but have not found much reading material on it. here at our company we have employees fill out a weekely timesheet and typically have clerks enter the information into the TM.PTA.00 (Project Timesheet with Rate/Amount Entry) and submit it that way. say we have this timesheet in a nice little excel sheet with columns that match the input boxes on the form, how can we get it to automatically input the data instead of having a person sit there and type it all in?
View Replies !
Determine Whether An Entry Is Validpresent??
I am writing a select statement to retrieve all data for a particular region. I need to select only the callerid's which are valid for that region. I have two tables: tblone contains PbX data, eg regionalid, callerid, donglearea and regionaldialup, tbltwo contains regionalid, and two columns which when concatenated make up a substring of the tblone.callerid... i need to do a check of the callerid in tblone against tbltwo to make sure it is a valid callerid. (ie. it is present in tbltwo) N.B. the concatenation of the two columns in tbltwo is only a substring of tblone.callerid. It is easy to concatenate the two rows and place them in a temp table, how do i then search through this table and if it is present, allow my select statement to print this entire row as part of the result set? if the callerid in tblone is not valid i have to do something similar against a dongle table using the donglearea field and if the dongle area is not valid i have to use the regionaldialup field and by using a predefined value (eg. 0800003554) to determine if the row is valid and should be selected. I then have to delete everything which was not valid from the table. I am a junior sql administrator and your help would be much appreciated! thanks!
View Replies !
Multiple Data Entry
iam new to MS SQL 7 server...i have two tables in my database say Table1 and Table2 having a comman field--- Name String(30). I want that dual data entry should be made for any single entry. That is if a name is entered in Table1, then same entry should be automatically entered in table2
View Replies !
Best Approach For A Required Entry
I have an online store with products and categories. The requirements are: Each product can be in one or more categories; a product must be in at least one category. To accomplish the first requirement, I have a Product table, Category table, and a many-to-many Product2Category table. (Probably not relevant, but a requirement is the Category table is self-referencing to provide sub-categories.) My question is for the second requirement that each Product be in at least one category. My assumption would be to add a column to the Product table called "ParentCategoryId", which is a foriegn key of the Category table's identity column. What would be the best approach to ensure a product is in at least one category? Thank you.
View Replies !
Get Latest Entry Per Userid
Hi, I have the following situation: I have a table that is log of transactions of useractions. Each time a userstatus changes, a new entry is made into the table. The table has (currently) about 4 million records, and keeps growing each day with thousands of records. It logs the status of about 150 users (currently active). What I now want is to get the log-entry from all the distinct users that have a log-entry on the latest day (so current day, 'where TimeStamp > 2008-04-08'). (extremely simplified) Example: (date is y/m/d) USERID TIMESTAMP STATUS ---------------------------------------------------- ... (thousands and millions of records above) Ed 2008-04-07 18:00:00 Logged_Out Jim 2008-04-07 18:30:00 Blabla_Status_5 Jack 2008-04-07 19:00:00 Logged_Out Jim 2008-04-07 19:30:00 Logged_Out Jim 2008-04-08 06:00:00 Logged_In (<< notice new day) Jim 2008-04-08 06:01:00 Blabla-Status_1 Bob 2008-04-08 06:03:00 Logged_In Fred 2008-04-08 06:05:00 Logged_In Jim 2008-04-08 06:08:00 Blabla-Status_2 Jack 2008-04-08 06:12:00 Logged_In Fred 2008-04-08 06:20:00 Blabla_Status_5 Jack 2008-04-08 06:12:00 Logged_Out Fred 2008-04-08 06:12:00 Blabla_Status_4 Jack 2008-04-08 06:12:00 Logged_In Jack 2008-04-08 06:12:00 Blabla_Status_7 ---------------------------------------------------- The result should be: USERID TIMESTAMP STATUS ---------------------------------------------------- Jack 2008-04-08 06:12:00 Blabla_Status_7 Fred 2008-04-08 06:12:00 Blabla_Status_4 Jim 2008-04-08 06:08:00 Blabla-Status_2 Bob 2008-04-08 06:03:00 Logged_In ---------------------------------------------------- (How) can this be done in one stored procedure?
View Replies !
Are There Any Entry Level DBA Positions?
Hi guys, I have just started studying for an MCTS, to eventually get to MCITP for SQL Server 2k5. I am currently in an Application Support position, working with a large clinical Oracle Database, but mainly on a simple querying basis. The plan is obviously to get away from the Tech Support, towards the DBA and I have been researching the current job market and never once found a job offer that said "offering an entry level or Junior DBA position for those that are just starting"... There's always at least a few years of experience already as a DBA required! I am wondering how one is supposed to get that experience if he doesn't get a beginners position to start off with? Any stories from experience? Any hints where to look, how to apply and where maybe? Thanks, -free-
View Replies !
How To Prevent A Second Entry Being Inserted With Primary Key Value? (C#)
Ok, this is a really stupid question, but I can't seem to find an answer I understand. In my SQL database I have a a table called MasterSkillList, to which the user can write by using a little web form with a text box and a drop down list. The table has 2 fields, Skill and Attribute. Skill is the primary key, as no skill can appear twice. What I want to do is prevent just that, I don't want people to enter the same skill more than once. So how do I tell the user that the entry allready exists in the database? My C# Code is as follows:1 protected void btnSubmit_Click(object sender, EventArgs e) 2 { 3 srcAddSkill.InsertParameters["Skill"].DefaultValue = txtSkillName.Text; 4 srcAddSkill.InsertParameters["Attribute"].DefaultValue = ddlAbility.SelectedValue; 5 try 6 { 7 srcAddSkill.Insert(); 8 lblErrorMessage.Text = "The skill '" + txtSkillName.Text + "' has been added. It is based on a character's " + ddlAbility.SelectedItem + " score."; 9 lblErrorMessage.Visible = true; 10 txtSkillName.Text = ""; 11 } 12 catch (Exception ex) 13 { 14 lblErrorMessage.Text = "An exception has occurred. " + ex.Message; 15 lblErrorMessage.Visible = true; 16 }
View Replies !
Checking If An Entry Exists In A Database
I would like to be able to check if a certain entry exists in a SQL table. Ideally, the output would be a boolean so I can use it in an IF statement which would tell it what to do depending on whether or not the entry exists. Thanks for anyone that helps. :)
View Replies !
Preventing Overlapping Data Entry
Hello Everyone, I have a web form that allows the user to select a time to reserve. I am trying to make it so that when a user selects a date to schedule something (which i have working) a drop down list will fill with times that have not been reserved. The data is stored in two tables: tblCalendar and tblTime. tblTime contains pkTimeID and times (which are all possible times to select from in half hour intervals). tblCalendar contains a few fields but timeID and date (which is in the format M/d/yyyy) are what I need to test against. timeID is the foreign key of pkTimeID. Basically when the user selects the date, a function gets called that will run a SELECT statement to get the times available. All of this works, I am able to fill the ddl with all times available no matter what the date is or what has already been reserved. I want to check if a time has been already selected based on the date selected by the user and only allow times not selected to be listed. After acheiving this I would like to prevent the immediate time before and immediate time after from being displayed because each reserved time will last for one hour but the data is stored in half hour increments. Any help/suggestions/links will be greatly appreciated. If I need to provide anything else please let me know. Thanks in advance, Brian
View Replies !
Display Duplicates Entry From Sql Server
Hello, I like to ask if anyone knows the sql statement to display all the field of a record from a table only showing the duplicates, and my criteria of duplicate is that a record has two fields with the same data. Thanks in advance. Regards, stealthnet
View Replies !
Supplemental Data Entry Screen
Hi All,I have a primary data entry web form that serves the need for 90% of the time, but sometime it requires additional information and require another form for the supplemental data. However, there is only one record inserted into SQL table for both screens.Because there are roughly 30 fields on the primary screen and 20 fields on the secondary screen, listing all 50 fields on a form is not a good option. Does anyone know how developers handle this or any article on the web relate to this issue?Thanks any advice!
View Replies !
Extra Characters Appended To Entry
I'm encountering a strange problem in all the applications I'm working on and am totally dumbfounded as to why it's occuring:From a standard web form I'm inserting a record using a stored procedure. (I'm writing this to a SQL 2000 db - where the column types and variables are all consistant) No matter what I do, the columns are padded with extra characters maxing out the field length (if it's nchar or nvarchar or char) after insert or update. I've tried Trim - ing the field.text values that I'm feeding to the @variables used in my stored procedure. I've even RTRIM() - ed the @variables within the stored procedure. No matter what I do I get extra spaces padding the end of the intended column input. Ideas anyone???Thanks in advance. - Abe
View Replies !
SQLAGENT.exe - Entry Point Not Found
Hi there;I was trying to apply SQL SP3a on my windows 2000 server (SP4), butthe installation failed and when I rebooted my server the SQL agentfailed to start and I get the following error:SQLAGENT.exe - Entry Point Not Foundthe procedure entry point SFMapi0GetProfiles could not be located inthe dynamic link library SEMMAP.dllNow, I tried replying SQLSP3a, but that keeps on failing and I keepgetting this error message.Any Idea .. Please help me.Thank you.
View Replies !
Adding Entry To DB And Getting Unique ID At The Same Time
Hi all,I'm writing a website with Cold Fusion and when a user submits arequest and it's stored in the MS SQL database, I want the unique ID(Identity field in table) to be given to the user on screen plusemailed to user.Now can I store data to the database (where the ID is created) andreturn this as a variable in the same statement? I've seen this doneon many websites, but I have no idea how to do it in one step.Thanks,Alex.
View Replies !
Entry Point Not Found With MS SQL Server
Hi All!Has anyone has seen this error before?Event Type:InformationEvent Source:Application PopupEvent Category:NoneEvent ID:26Date:5/14/2004Time:10:06:45 AMUser:N/ADescription:Application popup: sqlmangr.exe - Entry Point Not Found : Theprocedure entry point TraceMessage could not be located in the dynamiclink library ADVAPI32.dll.This computer is running MS SQL Server STD Edition 2000 W/ ServicePack 1.Thanks!
View Replies !
Duplicate Entry In A Primary Key Field
Hi everybody couldn't get through with saving my data on the table with two primary keys... my table structure is this pubidintUnchecked (primary key) pubchar(1)Unchecked publchar(1)Unchecked pubcodechar(2)Unchecked (primary key) a sample data is here pubid pub publ pubcode 1 a b ab 1 b b bb 2 a b ab 2 b b bb when i save this table modifying the pubid and pubcode as primary keys the following error displays... Unable to create index 'PK_PUBS3'. CREATE UNIQUE INDEX terminated because a duplicate key was found for index ID 1. Most significant primary key is '51'. Could not create constraint. See previous errors. The statement has been terminated. what i understand is that on the primary key duplicates are not allowed how could i allow it? thanks
View Replies !
Optimal Solution For Getting Timestamp Of Last Entry
Hi I'm trying to find the optimal way of getting the timestamp of the last updated entry in an mssql database. A database is updated only about 5 times a minute, how ever a request for the time of the last entry could be around 1 per second. For this reason i was thinking of having a separate table which has a single row which is updated everytime a new entry is updated in the main table. I would then only need a simple SELECT statement and need very little processing power. Is this the best method, or can you think of any others i could use? many thanks
View Replies !
|