|
thanks blackjack2150
but i want search my pdf data in database, and i can't extract each document to drive then search inside it, can anyBody tell me tradional or non-traditional component ?
thanks
|
|
|
|
|
|
Hello
I'm reading an excel file, Now the problem is that when reading it make some cells blanks.
THe reason is that if the first column value is of type text ("0.98ad") then it'll show only data like this format
or when it is numeric (0.8) then it shows only numeric values.
Any idea about it?
Thanks
Syed Shahid Hussain
|
|
|
|
|
Please don't cross post
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Hello everyone,
I am new to WCF and I want to learn,
- Basic samples for WCF and I want to deploy a WCF service which serves remote client request;
- How to use PrincipalPermission to control which user role could have permission execute which method.
Any samples to recommend (especially for the 2nd item)?
thanks in advance,
George
|
|
|
|
|
Hey George, did your ISP shut off your access to Google again? Or are you still working that job that pays you by the number of internet forum posts you make?
led mike
|
|
|
|
|
Thanks led!
I believe human is smarter than the stupid search engine.
Actually I found some, and read the MSDN 6 series start-up document.
regards,
George
|
|
|
|
|
how to work in user control
|
|
|
|
|
What u want to do with user control. Not a complete question.
Syed Shahid Hussain
|
|
|
|
|
What do you want to do?
nelsonpaixao@yahoo.com.br
|
|
|
|
|
i want to make GRID menu Bar
|
|
|
|
|
hi everyone!
i do have a problem, which occours on some machines but not on every machine:
when using the process.start method, it throws the exception the path is invalid.
System.Diagnostics.Process process = Process.Start(startInfo);
the startinfo is
System.Diagnostics.ProcessStartInfo startInfo = new ProcessStartInfo();
then I add Arguments (startInfo.Arguments), a FileName (startInfo.Filename), set the UseShellExecute to true (startInfo.UseShellExecute = true) ,set the CreateNoWindow to true (startInfo.CreateNoWindow) to hide the window, then set the RedirectStandardOutput to false during one try and to true in another try (startInfo.RedirectStandardOutput = false or true) and then I reset the UseShellExecute to false (startInfo.UseShellExecute = false).
Finally I invoke the methode but it throws the exception described above.
Does anyone of you have an idea? i checked all the paths and they are correct (meaning those I used during assigning the parameters).
thanks.
Stephan.
|
|
|
|
|
Which Application you are running ? and, what is the path u given.
post your code.
|
|
|
|
|
....
if (string.IsNullOrEmpty(AcrobatReaderPath))
{
AcrobatReaderPath = @"C:\Programme\Adobe\Reader 8.0\Reader\AcroRd32.exe";
}
logger.Info("AcrobatReaderPath = " + AcrobatReaderPath);
System.Diagnostics.ProcessStartInfo startInfo = new ProcessStartInfo();
logger.Info("1");
startInfo.Arguments = "/h /t \"" + pdfFileName + "\" \"" + printerName + "\"";
logger.Info("2");
startInfo.FileName = AcrobatReaderPath;
logger.Info("3");
startInfo.UseShellExecute = true;
logger.Info("4");
startInfo.CreateNoWindow = true;
logger.Info("5");
startInfo.RedirectStandardOutput = false;
logger.Info("6");
startInfo.UseShellExecute = false;
logger.Info("7");
System.Diagnostics.Process process = Process.Start(startInfo);
logger.Info("8");
....
I checked the acrobat path, it is correct. I checked the pdfFileName path, it is correct. I also checked the printername and this is correct as well.
But when starting the process it throws the error message.
What the code does: it prints a pdf file (located on harddisk) using the specified printer.
As I said in my first posting, I tried it on different systems, there are some it works fine (no error message) but there are some which cause this message. And I have no clue why.
the logging works well, so this should not be the problem!
Stephan.
|
|
|
|
|
the command which you are given , check that command manually whether it prints or not,
Break your problem i 2-3 steps.
First check whether acro reader is opening your file or not , if yes then check the full problem.
|
|
|
|
|
i already did this, and it works.
but it does not work the way i programmed it.
i will try to start just adobe and proceed step by step, maybe I will stumble into this error.
|
|
|
|
|
strange, the error is gone now, but this process should start the printing on the specified printer, but the program finishes with returncode ok but the file never reaches the printer.
does this mean the processcall here doesn't throw any exception anymore but it doesn't really do what it should have done?
does anyone of you have an idea?
Stephan.
|
|
|
|
|
when i set the process to start acrobate then it does, but it does not send the file to printer, as it is intended to.
is there a way to debug this (meaning the process) to see, why no file is received by the printer queue?
|
|
|
|
|
Are you doing a "File.Exist(startInfo.Filename) = True" check before you are starting?
Search for that file on the machine... If there are multiple copies, it may be trying to pull from a directory the %path%.
|
|
|
|
|
Hi,
I got the error message "object reference not set to an instance". Actually i am doing a small program on DataReader then the above said message comes. Please any suggestions..
|
|
|
|
|
It seem that you are referencing an object which is not created.
post your code.
|
|
|
|
|
private void findbutton_Click(object sender, EventArgs e)
{
SqlDataReader rdr = null;
SqlConnection con = null;
SqlCommand cmd = null;
try
{
// Open connection to the database
string ConnectionString = "server=INDUS-SERVER;uid=sa;pwd=victory;database=northwind";
con = new SqlConnection(ConnectionString);
con.Open();
// Set up a command with the given query and associate
// this with the current connection.
string CommandText = "SELECT FirstName, LastName" + "FROM Employees" + "WHERE (LastName LIKE @Find)";
cmd = new SqlCommand(CommandText);
cmd.Connection = con;
// Add LastName to the above defined paramter @Find
cmd.Parameters.Add(
new SqlParameter(
"@Find", // The name of the parameter to map
System.Data.SqlDbType.NVarChar, // SqlDbType values
20, // The width of the parameter
"LastName")); // The name of the source column
// Fill the parameter with the value retrieved
// from the text field
cmd.Parameters["@Find"].Value = txtFind.Text;
// Execute the query
rdr = cmd.ExecuteReader();
// Fill the list box with the values retrieved
lblFound.Items.Clear();
while (rdr.Read())
{
lblFound.Items.Add(rdr["FirstName"].ToString() + " " + rdr["LastName"].ToString());
}
}
catch (Exception ex)
{
// Print error message
MessageBox.Show(ex.Message);
}
finally
{
// Close data reader object and database connection
if (rdr != null)
rdr.Close();
if (con.State == ConnectionState.Open)
con.Close();
}
|
|
|
|
|
hi
Well there are couple of things that you are not doing right in your code. Your comments are interfering with your code. Your code is creaming "Put me inside a Function"
You have used unnecessary things in your code. if you can try to write your code like this
public SqlDataReader GetData()
{
SqlDataReader rd;
SqlConnection con;
SqlCommand cmd = new SqlCommand();
string ConnectionString = "server=INDUS-SERVER;uid=sa;pwd=victory;database=northwind";
con = new SqlConnection(ConnectionString);
cmd.CommandText = "SELECT FirstName, LastName" + "FROM Employees" + "WHERE (LastName LIKE @Find)";
cmd.Connection = con;
cmd.Parameters.Add(new SqlParameter("@Find", SqlDbType.NVarChar, 20, "LastName"));
cmd.Parameters["@Find"].Value = txtFind.Text;
try
{
con.Open();
rd = cmd.ExecuteReader();
rd.Close();
con.Close();
}
catch (SqlException e)
{
Messagebox.show(e.Message);
}
return rd;
}
}
}
Now things are Better, because Previously you just opened the Connection where you were not supposed to, remember that you have to connect to the Database when you want to execute something. after you are done you close it, and now this function returns a reader, then you can iterate through your records or your can just choose to send the data into the datatable and bind the control.
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Stil i'm getting error..i will do one thing just i will paste all the code.please resolve it...
Code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace DataReaderWith2Tables
{
public partial class Form1 : Form
{
private System.Windows.Forms.ListBox lblFound = null;
private System.Windows.Forms.Button findButton;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox txtFind = null;
//private System.ComponentModel.Container components = null;
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void findbutton_Click(object sender, EventArgs e)
{
SqlDataReader rdr;
SqlConnection con;
SqlCommand cmd = new SqlCommand();
string ConnectionString = "server=INDUS-SERVER;uid=sa;pwd=victory;database=northwind";
con = new SqlConnection(ConnectionString);
cmd.CommandText = "SELECT FirstName, LastName" + "FROM Employees" + "WHERE (LastName LIKE @Find)";
cmd.Connection = con;
cmd.Parameters.Add(new SqlParameter("@Find", System.Data.SqlDbType.NVarChar, 20, "LastName"));
cmd.Parameters["@Find"].Value = txtFind.Text;
try
{
con.Open();
rdr = cmd.ExecuteReader();
rdr.Close();
con.Close();
}
catch (SqlException ex)
{
MessageBox.Show(ex.Message);
}
return rdr;
}
}
}
|
|
|
|
|
I think you are closing the rdr (rdr.Close()) in try block and then you are trying to return rdr (return rdr). Please check it.
|
|
|
|