Click here to Skip to main content
15,917,645 members
Home / Discussions / C#
   

C#

 
GeneralRe: Bioinformatics / DNA / Protein analysis - in C# Pin
mg123430-Nov-07 19:17
mg123430-Nov-07 19:17 
Question[Message Deleted] Pin
gubba30-Nov-07 13:44
gubba30-Nov-07 13:44 
AnswerRe: setting timer Pin
Christian Graus30-Nov-07 15:00
protectorChristian Graus30-Nov-07 15:00 
General[Message Deleted] Pin
gubba30-Nov-07 15:15
gubba30-Nov-07 15:15 
GeneralRe: setting timer Pin
Paul Conrad30-Nov-07 15:19
professionalPaul Conrad30-Nov-07 15:19 
QuestionChanging MDB Tool Generated Dataset Source Pin
Reanalyse30-Nov-07 12:55
Reanalyse30-Nov-07 12:55 
QuestionQuestion about Base64 code example Pin
CCMint30-Nov-07 12:50
CCMint30-Nov-07 12:50 
QuestionLooks like database connection is giving an error that the object is null Pin
T4AMD30-Nov-07 11:04
T4AMD30-Nov-07 11:04 
namespace Authors
{
public partial class frmEditor : Form
{
string[] ArticlesTypes;


OleDbConnection dbArticles = new OleDbConnection();

public frmEditor(string[] ArticleToUse)
{

ArticlesTypes = ArticleToUse;
dbProfiles.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source = G:\\CSharp\\Profiles.mdb;Jet OLEDB:Database Password=password;Persist Security Info=False";
InitializeComponent();
}
string ArticlesTypesInUse = "";
bool isUpdate = false;

private void frmEditor_Load(object sender, EventArgs e)
{
if (ArticlesTypes[0] == "ArticleID")
{
try
{
isUpdate = true;
OleDbCommand cmd = new OleDbCommand("select type_id from proArticles where profile_id= " + ArticlesTypes[1], dbArticles);
if (dbArticles.State == ConnectionState.Closed)
dbArticles.Open();
string[] sep = new string[1];
sep[0] = ",";
string[] ptu = cmd.ExecuteScalar().ToString().Split(sep,StringSplitOptions.RemoveEmptyEntries); //I am getting an error here saying "Object Reference not set to an instance of an object". Dont know how to correct this problem. Looks like there is something wrong with the connection.
for (int i = 0;i < ptu.Length; i++)

what should I do if database connection is give me a null error??
AnswerRe: Looks like database connection is giving an error that the object is null Pin
Ian Shlasko30-Nov-07 11:12
Ian Shlasko30-Nov-07 11:12 
GeneralRe: Looks like database connection is giving an error that the object is null Pin
T4AMD30-Nov-07 11:39
T4AMD30-Nov-07 11:39 
GeneralRe: Looks like database connection is giving an error that the object is null Pin
Pete O'Hanlon30-Nov-07 11:50
mvePete O'Hanlon30-Nov-07 11:50 
AnswerRe: Looks like database connection is giving an error that the object is null Pin
Pete O'Hanlon30-Nov-07 11:35
mvePete O'Hanlon30-Nov-07 11:35 
QuestionNeed c# programmer Pin
AndreasSweden30-Nov-07 10:19
AndreasSweden30-Nov-07 10:19 
AnswerRe: Need c# programmer Pin
Paul Conrad30-Nov-07 10:56
professionalPaul Conrad30-Nov-07 10:56 
QuestionHow can I clear a buffer? Pin
daavena30-Nov-07 9:37
daavena30-Nov-07 9:37 
AnswerRe: How can I clear a buffer? Pin
Dan Neely30-Nov-07 9:45
Dan Neely30-Nov-07 9:45 
GeneralRe: How can I clear a buffer? Pin
daavena30-Nov-07 10:10
daavena30-Nov-07 10:10 
GeneralRe: How can I clear a buffer? Pin
Ian Shlasko30-Nov-07 11:08
Ian Shlasko30-Nov-07 11:08 
GeneralRe: How can I clear a buffer? Pin
daavena1-Dec-07 1:40
daavena1-Dec-07 1:40 
AnswerRe: How can I clear a buffer? Pin
Anthony Mushrow30-Nov-07 10:00
professionalAnthony Mushrow30-Nov-07 10:00 
AnswerRe: How can I clear a buffer? Pin
ovrgarriga30-Nov-07 10:49
ovrgarriga30-Nov-07 10:49 
GeneralRe: How can I clear a buffer? Pin
daavena30-Nov-07 12:40
daavena30-Nov-07 12:40 
GeneralRe: How can I clear a buffer? Pin
ovrgarriga1-Dec-07 1:16
ovrgarriga1-Dec-07 1:16 
GeneralRe: How can I clear a buffer? Pin
daavena1-Dec-07 1:49
daavena1-Dec-07 1:49 
JokeRe: How can I clear a buffer? Pin
PIEBALDconsult30-Nov-07 13:06
mvePIEBALDconsult30-Nov-07 13:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.