Oh I think I get it now, should of had a cup of coffee this morning
DECLARE @PostalCode VarChar(12), @CustomerID Int, @StreetAddress1 VarChar(80);
SET @PostalCode = '92648';
SET @CustomerID = 5;
SET @StreetAddress1 = '18751 Park Haven Lane';
WHERE PostalCode = @PostalCode
AND CustomerID = @CustomerID
AND LEFT(StreetAddress1, 5) = LEFT(@StreetAddress1, 5)
I should of removed all the chars that are not A-Z a-z 0-9 first.
Well so far so good, much better than before.
I was creating a card record with the billing and shipping address. Worked fine for 10 years.
The users on the back end complained about it. Users with no programming experience complained that if they wanted to ship to a different address, they had to create a new card record and enter all the information again.
So I split everything up into separate records, and recorded the ID's of each record in the order record.
But a problem surfaced with duplicate records, in which I did a horrible job in checking for duplicates.
So checking a card record was easy, but checking a address record became more complicated.
New to the forum here im hoping im in the right place. I work for my father at CetraCom in Ohio. He has recently put me on a new project for a client of ours. We're setting up a license scanner/reader that has a software that automatically fills out the info into a database. I need to be able to upload that Database to the States website in an XML format. They have already written the XML Schema. I am not a coder by any means but i did some reading on XML and it seems pretty straight forward. My question is: How would i go about performing this action (uploading the info from the database to their website while following their XML Schema)? Whats the easiest way to go about it?
The basic idea is that you create a class which matches the structure of the XML file, then your program instantiates the object, fills in the properties and calls a "Save" method which writes the value of the object out in XML format.
Sounds much easier than it is, but once you get the hang of it, works well.
Lots of articles here on how to serialize objects.
This project is for a local scrap yard so they will not have a database server it will be run on the computer itself. Once i get home ill link the XML schema the state has provided and other such details to help you help me sorry if i was a bit too vague. As i stated, i am by no means a coder :P . I have messed around with an SQL server a bit before for a program the county uses but its not one i had to set up myself so i am a bit unfamiliar with such things, but im always willing to learn. Thanks for the replies i will post more details this evening EST
I am trying to build a SSIS Package programmatically with .NET (C#).
Now I have problems with the component "OLE DB Source" when trying to set the ParameterMapping in order to use variables in the data flow task.
string srcSql = "SELECT bla bla from ABC where YY = ? and BB = ? ";
Source.SetComponentProperty("SqlCommand", srcSql );
Guid ParamGuid = new Guid(TrackingIDOld.ID);
Guid ParamGuid1 = new Guid(TrackingIDNew.ID);
// Here I am trying to set the parameters. However, it does not work!
Source.SetComponentProperty("Parameter0 Name", ParamGuid.ToString());
Source.SetComponentProperty("Parameter1 Name", ParamGuid1.ToString());
Alternatively, I also tried this, but it does not work, too:
Not having tried this, but I would imagine you can create a trigger on delete from the table that calls a stored procedure to send an e-mail.
As for the syntax, you should be able to find how to create the trigger relatively easily.
But, for sending e-mail, that may be dependent on your e-mail platform.
I would not recommend sending an email directly from a delete trigger because you may pay a performance penalty and possibly abort your delete transaction if the email server cannot send your message.
Slight change in approach would be to write a custom "logging" table where you capture the entire row from the table and store it. You can then have a separate program read through this table and send emails notifying your distribution list.
The other advantage is that you have a copy of the deleted data. You can purge this data as you see fit.
I'm converting some old CDao classes to ADO (ODBC) for Access database handling. Part of my code copies a table record from one database to another. When I do the CRecordset::Update I get a CDBException that completely unhelpfully tells me:
m_strError "String data, right truncated
m_strStateNativeOrigin "State:22001,Native:31,Origin:[Microsoft][ODBC Microsoft Access Driver]
Is there any way to get my code to tell me which field(s) is(are) causing the problem?