Click here to Skip to main content
15,922,533 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: ASP.NET and JAVASCRIPT Pin
analytiks22-Dec-05 19:28
analytiks22-Dec-05 19:28 
GeneralRe: ASP.NET and JAVASCRIPT Pin
MinaFawzi24-Dec-05 3:36
MinaFawzi24-Dec-05 3:36 
GeneralRe: ASP.NET and JAVASCRIPT Pin
analytiks25-Dec-05 2:38
analytiks25-Dec-05 2:38 
GeneralRe: ASP.NET and JAVASCRIPT Pin
MinaFawzi25-Dec-05 13:31
MinaFawzi25-Dec-05 13:31 
GeneralRe: ASP.NET and JAVASCRIPT Pin
enjoycrack22-Dec-05 6:52
enjoycrack22-Dec-05 6:52 
QuestionODBC on the WebServer Pin
gmhanna20-Dec-05 10:25
gmhanna20-Dec-05 10:25 
GeneralRe: ODBC on the WebServer Pin
Andy Brummer20-Dec-05 11:17
sitebuilderAndy Brummer20-Dec-05 11:17 
GeneralRe: ODBC on the WebServer Pin
gmhanna20-Dec-05 12:47
gmhanna20-Dec-05 12:47 
I selected Data Sources from the Administrative tools. I added a User DSN and a System DSN and tried adding a File DSN. However the File DSN is not showing up but if I try to add it again it tells me it already exsists.

These are DB4 databases (.DBF and .MDX) files. The files exist in the application root directory.

I have the Webserver default page set to d:\development and I have changed WWWROOT$ to also point to d:\development. I then added a Virtual Directory called MCP which exsists under D:\development. So the directory structure is d:\development\mcp. The DB4 databases are in d:\development\mcp, which is also the path information that I put into the Data Sources.

I created a simple program that is a form that has two buttons, one says "Load Merchant" and the other says "Load Userids". The code for the userids is the same for the merchants, however the table name changes. See code below:

string				strCompanyName;<br />
			OdbcDataAdapter		odbcDataAdapter;<br />
			OdbcCommandBuilder	odbcCommandBuilder;;<br />
			OdbcConnection		odbcConnect;<br />
		          <br />
			// ---------------------------------------------------------------------------<br />
			// Prepare to open the Merchant Database to populate the Merchant names<br />
			// ---------------------------------------------------------------------------<br />
			DataSet		dataSet = new DataSet( );<br />
<br />
			odbcConnect = new OdbcConnection("DSN=MCP;");<br />
			<br />
			try<br />
			{<br />
				odbcConnect.Open( );<br />
			}<br />
<br />
			catch<br />
			{<br />
				cbMerchant.Items.Add("ERROR OPENING MCP");<br />
				return;<br />
			}<br />
<br />
			odbcDataAdapter = new OdbcDataAdapter("Select * from Merchant", odbcConnect);<br />
			odbcCommandBuilder = new OdbcCommandBuilder(odbcDataAdapter);<br />
			odbcDataAdapter.Fill(dataSet, "Merchant");	<br />
<br />
			DataTable dataTable = dataSet.Tables[0];<br />
<br />
			foreach (DataRow dataRow in dataTable.Rows)<br />
			{<br />
				strCompanyName = (string) dataRow["NAME"];<br />
				cbMerchant.Items.Add(strCompanyName);<br />
			}<br />


When I make a non-web version of the same code it works perfect, all the entries from the DB4 file gets loaded into a Combobox, yet when I run this on the Webserver, the "catch" block of code grabs it and says, "Error opening MCP".

Filemon shows no attempt at all trying to open the database on the D drive, however I had it scoped only to D, it maybe trying to open something on C:.

I don't want to hard code a file path as this can change per installation. I know I can code something in Web.config but I rather not. I was trying to use "Code Base SQL 2.0" to read the file since I had a license for it, however it was having problems reading the Merchant Table for some reason.

Glenn
AnswerRe: ODBC on the WebServer Pin
Guffa20-Dec-05 21:31
Guffa20-Dec-05 21:31 
GeneralRe: ODBC on the WebServer Pin
gmhanna21-Dec-05 5:42
gmhanna21-Dec-05 5:42 
QuestionInternet Explorer Title Bar Corrupt -- Displays Only Square Boxes Pin
Kevin McFarlane20-Dec-05 4:17
Kevin McFarlane20-Dec-05 4:17 
AnswerRe: Internet Explorer Title Bar Corrupt -- Displays Only Square Boxes Pin
jcrussell22-Dec-05 18:00
jcrussell22-Dec-05 18:00 
GeneralRe: Internet Explorer Title Bar Corrupt -- Sorted Pin
Kevin McFarlane22-Dec-05 23:46
Kevin McFarlane22-Dec-05 23:46 
QuestionCan't catch ActiveX control events after web page refresh Pin
Calc2020-Dec-05 3:21
Calc2020-Dec-05 3:21 
Questiongetting resource report in asp Pin
karanba19-Dec-05 23:19
karanba19-Dec-05 23:19 
AnswerRe: getting resource report in asp Pin
Guffa20-Dec-05 3:27
Guffa20-Dec-05 3:27 
AnswerRe: getting resource report in asp Pin
Andy Brummer20-Dec-05 11:04
sitebuilderAndy Brummer20-Dec-05 11:04 
QuestionSMS Pin
aasstt19-Dec-05 22:24
aasstt19-Dec-05 22:24 
AnswerRe: SMS Pin
enjoycrack20-Dec-05 21:03
enjoycrack20-Dec-05 21:03 
Questionproblem making dll for clint side Pin
uktrips00719-Dec-05 22:20
uktrips00719-Dec-05 22:20 
AnswerRe: problem making dll for clint side Pin
Guffa20-Dec-05 3:30
Guffa20-Dec-05 3:30 
QuestionAudio files playing in Browser window Pin
progman19-Dec-05 14:55
progman19-Dec-05 14:55 
AnswerRe: Audio files playing in Browser window Pin
minhpc_bk19-Dec-05 15:38
minhpc_bk19-Dec-05 15:38 
QuestionInput file Pin
mandaaa2019-Dec-05 9:28
mandaaa2019-Dec-05 9:28 
AnswerRe: Input file Pin
Guffa20-Dec-05 2:06
Guffa20-Dec-05 2: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.