|
Must be just me, being down with the flu today
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
Ick. I know how that feels. If you have chest issues I tried an old wives' treatment of vicks vaporub on the feet and socks. It did seem to help some.
Blog link to be reinstated at a later date.
|
|
|
|
|
Not sure if it was a 24 hour flu thing or food poisoning. Regardless of which ever it was, Campbell's Chicken Noodle Soup and Green Tea seems to be doing the job
Feeling better enough to go for Chicken Enchiladas for dinner.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
Stop this abuse. I am looking for genuine answers.
|
|
|
|
|
vinoo80 wrote: I am looking for genuine answers.
Good luck to you
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
Paul Conrad wrote: vinoo80 wrote:
I am looking for genuine answers.
Good luck to you
Aye. Especially on the CodeProject forums it seems!
What ever happened to this place?
|
|
|
|
|
I don't think the text encoding is your problem. Based on a quick Google search, it looks like GetPageContent doesn't do text extraction for you. It just returns the uncompressed operator stream. You will need to get cozy with the PDF file format and parse those operators to extract the text from the operators. You will also need to use heuristics to figure out how to put the text back together, because text operators don't necessarily appear in the pdf file in the same order as they get displayed. Even then it may not be possible to accurately extract the text.
Here's an example of how you'd miss the text given the method you're using now. Searching for "Test" with the following operators would fail:
(T) Tj
(e) Tj
(s) Tj
(t) Tj
And here's an example of where you'd probably never find the text no matter what you do:
1 0 0 1 100 0 Tm
[(t) -10 (s) -10 (e) -10 (T)](TJ
These operators display "Test", but the text you'd likely extract is "tseT".
And don't forget to parse the form resources as well. Some pdf file creators like hiding text in forms. And by forms I don't mean forms that you fill out. See the PDF spec for info on form resources.
PS: In the future, don't bother saying your question is "Urgent". No one cares, and it's more likely to have your question ignored. I replied because it was a reasonable question and you showed that you at least made a little effort to figure it out yourself.
|
|
|
|
|
Thanks a lot, for the valuable inputs. Let me take this from here and report here if I find any solutions.
|
|
|
|
|
I'm no stranger to programming, but I am brand new to programming with databases. I use MS Visual C# 2005. I have tried making forms with datasets and table adapters and it looks just fine... that is, until I try to make a change.
I have a simple form with a single datagridview. I edit the records, click the Save button on the binding navigator, the tableadapter.Update() method returns the correct number of updated rows, but when I close the program and re-open it, the changes aren't there.
Am I leaving out something? Is there extra code needed? etc.?
Thanks.
|
|
|
|
|
danielhasdibs wrote: Am I leaving out something?
Yes.
danielhasdibs wrote: Is there extra code needed?
Yes.
danielhasdibs wrote: etc.?
Yes.
Seriously though, there are any number of things that could be wrong. Is your query for fetching the data to initialize your grid view somehow filtering out the new rows? Are your updates part of a transaction that is never committed? If you are running SQL Server and have all the client tools, see if you can run "SQL Profiler" to see what queries are being run when you save your data.
--
gleat
http://blogorama.nerdworks.in[ ^]
-- Number Two's eyes narrowed and became what are known in the Shouting and Killing People trade as cold slits, the idea presumably being to give your opponent the impression that you have lost your glasses or are having difficulty keeping awake. Why this is frightening is an, as yet, unresolved problem. -- HHGTG
|
|
|
|
|
Well, can you provide a sample of the code so folks can see what is going on?
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
Here is what I do:
I open a new project,
I create a database,
I enter one table into the database,
I add three or four records to the table,
I add the database as a data source,
I drag the table from the data source to the form to create a datagridview,
I run the program,
I edit/add records on the form and click the Save button from the binding navigator,
I close the program,
I re-open the program,
and the changes are not there.
What am I missing?
Here's the code for the save button click event:
private void customerBindingNavigatorSaveItem_Click(object sender, EventArgs e)
{
this.Validate();
this.customerBindingSource.EndEdit();
this.customerTableAdapter.Update(this.myCompanyDataSet.Customer);
}
|
|
|
|
|
Here is what I do:
I open a new project,
I create a database,
I enter one table into the database,
I add three or four records to the table,
I add the database as a data source,
I drag the table from the data source to the form to create a datagridview,
I run the program,
I edit/add records on the form and click the Save button from the binding navigator,
I close the program,
I re-open the program,
and the changes are not there.
What am I missing?
|
|
|
|
|
I found the answer:
SOLUTION:
1. Right Click Properties on tablename.mdf in Solution Explorer
2. Set the "Copy to Output Directory" property to "Copy if newer"
3. Run the program, and it should work in the IDE.
|
|
|
|
|
Hi Daniel,
In C# i add/edit/delete database data by triggering store_procedures with help of a partcular event(most times a buttom_click).
I really don´t edit the way you said because it accepts everthing, so i don´t do that stuff. I always create conditions!!! so that method doesn´t apply to me.
So, i dont know if you have already your anwser, but remember that you are editing a database not the datagrdview!!!
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|
|
In my c# 2005 windows form application I have a timer that pulls data from a mssql 2005 database. The query and code works fine most of the time. Occationally the sql connection will time out when connecting to the database or I'll get deadlocked by someone elses program.
What I need to change in my code so if the SQL connections has a exception it will continue to run as if nothing happened or change a label to say timeout. Since the SQL commands run on a timmer it will run again to update it shortly.
private void SQL_Timer_Tick(object sender, EventArgs e)
{
SqlConnection connection = new SqlConnection(connectionString);
connection.Open();
SqlCommand command = new SqlCommand("SELECT site from table);
SqlDataReader reader = command.ExecuteReader();
while (reader.Read())
{
presite.Add(reader.GetString(0));
point.Add(reader.GetString(1));
}
connection.Close();
}
|
|
|
|
|
Catch the Exception.
Oh, I forgot, you'll want to know what the problem was; deep inside the System.Data.SqlClient.SqlException is an error code you can translate.
Among the code included with my database accessor article[^] is the file SqlServerErrorInfo.cs which should be of help.
modified on Tuesday, October 28, 2008 2:19 PM
|
|
|
|
|
I have this activex control in my C# application. It has a method that will allocate a block of memory and return a variant. The variant contains HGLOBAL to the memory. In C++ it is simple to GlobalLock the memory pointer and access the data. How does one do this in C#?
system.object va;
va = object.GetMethod();
|
|
|
|
|
Here is c++ code, want to do same in c#:
COleVariant va;
BYTE *pSrc;
va = m_object.GetMethod();
HGLOBAL h = (HGLOBAL)va.lVal;
pSrc = (BYTE*)GlobalLock(h);
|
|
|
|
|
Hello World !
I want to call(run) my default dial_up connection with C#...
how can this ...
TanX world ...
if(Human.live)
{
Human.peaceful = false;
while(true)
{
Human.love(Human girl, Human Boy);
}
}
|
|
|
|
|
Hello everyone,
My application runs under low privilege account like NetWork Service, but in some specific method I need to have high privilege (e.g. to write to registry or access some local file).
So, I want to change the user privilege of some specific method of a class. Does anyone have any good ideas how to do this in .Net?
thanks in advance,
George
|
|
|
|
|
George_George wrote: Does anyone have any good ideas how to do this in .Net?
Yes.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi Mark,
Do you mean impersonate?
I have investigated impersonate technologies and it looks good. But two more issues with
impersonate technogies.
http://www.codeproject.com/KB/cs/zetaimpersonator.aspx
- How to manage the password expire issue? (for example, in the current domain, the
policy is for every 6 months, password must be changed);
- Is it possible to impersonate from a high privilege to a low privilege user without
providing password? My concern is to hardcode password in source code.
regards,
George
|
|
|
|
|
George_George wrote: How to manage the password expire issue?
How are you dealing with it on the account the process starts under?
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Sorry Mark!
I do not know what do you mean "dealing with it on the account the process starts under" -- could you say some other words please?
regards,
George
|
|
|
|