1
Answer

c# and directX creating release version

123carsten

123carsten

21y
1.9k
1
Hi there, anyone ever tried to create a release version of C# project that uses directX??? I tried it on a clean system. so first DX 9 had to be installed and since my application is for the .NET-Framework, that was installed too. Trying to run my programm only caused error messages to pop up!!! Running it on the system it was developed on, as release or debug is working well. It seems somethings are missing on my test system. I also tried to run a DX sample which is supplied with DXSDK, but that also failed showing the same error message. After installing the DX-SDK on the test system, the DX sample ran no probs, not my own project though. However, it can´t be right to install the SDK to be able to run a program. Surley the .Net-Framework must be enough. Waiting in anticipation for replies
Answers (1)
0
Bechir Bejaoui

Bechir Bejaoui

NA 20.1k 5.3m 16y

Good, the code is well optimized
0
Ghaffar Abdul

Ghaffar Abdul

NA 11 0 16y
Thanks for your reply. I sort out the problem. by createing another class i.e.

using System;

using System.Data;

using System.Configuration;

using System.Linq;

using System.Web;

using System.Web.Security;

using System.Web.UI;

using System.Web.UI.HtmlControls;

using System.Web.UI.WebControls;

using System.Web.UI.WebControls.WebParts;

using System.Xml.Linq;

public class AddCountry

{

private int _countryID;

private string _countryName;

public int CountryID { get { return _countryID; } }

public string CountryName { get { return _countryName; } }

public AddCountry(int id, string name)

{

_countryID = id;

_countryName = name;

}

}

Then modifying the following code. I used this sample from a code written by Bill Jevens of microsoft on Personal Web Starter Kit.

using (SqlDataReader reader = objCommand.ExecuteReader(CommandBehavior.CloseConnection)){

while (reader.Read()){

AddCountry temp = new AddCountry((int)reader["CountryID"], (string)reader["CountryName"]);

list.Add(temp);}}

return list;

0
Bechir Bejaoui

Bechir Bejaoui

NA 20.1k 5.3m 16y

OK abdul if you want to use DataReader and displaying all member then replace the loop

while (objReader.Read())

{

objCountry.CountryID = (int)objReader["CountryID"];

objCountry.CountryName = (string)objReader["CountryName"];

list.Add(objCountry);

}

by

do

{

objCountry.CountryID = (int)objReader["CountryID"];

objCountry.CountryName = (string)objReader["CountryName"];

list.Add(objCountry);

objReader.NextResult();

}

while (objReader.Read())

 
0
Ghaffar Abdul

Ghaffar Abdul

NA 11 0 16y
Thanks for your reply. please refine your reply sir, i didn't get your point.
0
Bechir Bejaoui

Bechir Bejaoui

NA 20.1k 5.3m 16y

The Data reader is  read-only not udate could be done, forward-only , which means we cannot go back to the previous record which was accessed.
It is worth is your case to use a data adapter that fills a data set within the data and then you can use the cached data to leaverage what ever you want, if any changes are done then use adapter.update();