Accessing MSAccess2k w/out DSN


Hopefully a simple one.
I have a experiment site with access to .Net and can use MS Access 2000 databases (Brinkster), but can't for the life of me figure out how to connect to the database using the new .Net ADO/OLEDB stuff.

the MSDN examples appear to be for SQL Server DBs.

How to do it

(whatever happened to good old dbq=server.mappath...)
codestorm
Fire bad. Tree pretty.\t- Buffy
, I'm operating on a limited mental budget here.

Posted On: Wednesday 2nd of January 2013 02:29:59 AM Total Views:  336
View Complete with Replies

RELATED TOPICS OF ASP.NET PROGRAMMING LANGUAGE




limit the maximum size of file attachment and display error massege

every body I design the contact form but i face one problem it is when attachment the file i want to limit the size of file to 20 mb only and i do it in web.config this code: and in the vb file i do this code 'Attach file using FileUpload Control and put the file in memory stream If FileUpload1.HasFile Then mail.Attachments.Add(New Attachment(FileUpload1.PostedFile.InputStream, FileUpload1.FileName)) If (FileUpload1.PostedFile.ContentLength) > 20000 Then MsgBox("Your attachment is larger than the maximum limit for attachments.") End If End If but when attache the file that is more than 20 mb display error page "the web page is not available" i want your help as soon as possible Thank you
VIEWS ON THIS POST

202

Posted on:

Friday 23rd November 2012
View Replies!

how to on remote connection of sql server?

Now I can access the publish web site from another computer,but the pages which are accessible from database is showing the following error: Server Error in '/arpita' Application. Login failed for user 'RAJ\ASPNET'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'RAJ\ASPNET'. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [SqlException (0x80131904): Login failed for user 'RAJ\ASPNET'.] System.Data.SqlClient.SqlInternalConnection.onerror(SqlException exception, Boolean breakConnection) +4844759 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +194 System.Data.SqlClient.TdsParser.Run(Runbehavior runbehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2392 System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +35 System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) +144 System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +342 System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +221 System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +189 System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +185 System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +31 System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +433 System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66 System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +499 System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +65 System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +117 System.Data.SqlClient.SqlConnection.Open() +122 userlogIn.btnLogIn_Click(Object sender, EventArgs e) +21 System.Web.UI.WebControls.Button.onclick(EventArgs e) +111 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565 Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053 Somebody please help me!!!!
VIEWS ON THIS POST

162

Posted on:

Friday 23rd November 2012
View Replies!

online examination system

how to get login from user
VIEWS ON THIS POST

149

Posted on:

Saturday 24th November 2012
View Replies!

TextBox1_TextChanged

I Have One Textbox & Lable on form. I want as the User types in textboxes in Label, text is there " " + Textbox Text. SOURCE TAB "Sonia" \t \t \t \t \t \t CODE BEHIND PAGE using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; public partial class Practiset : System.Web.UI.Page { public void TextBox1_TextChanged(object sender, EventArgs e) { lblMessage.Text = " " + TextBox1; } } No Error is Coming, but As I TYpe in Textbox,in Label Text is not Changing. Secondly I want to know Dat,Dat as in VB.Net we choose Control Name & Its Events. IN C# [code] public void TextBox1_TextChanged(object sender, EventArgs e) I have to write it by own.
VIEWS ON THIS POST

209

Posted on:

Saturday 24th November 2012
View Replies!

Update using Stored Procedure (ASP.NET with C#)

Hi I have a s.p to update administrators on my site. on the sql side the update works, when i hard code the values in it works but when i pass values that are in the textbox it does not update here is my code S.P 1 CREATE PROCEDURE [dbo].[spUpdateAdministrator] 2 @email varchar(50), 3 @password varchar (16), 4 @firstName varchar (30), 5 @lastName varchar (30) 6 7 AS 8 BEGIN 9 -- SET NOCOUNT ON added to prevent extra result sets from 10 -- interfering with SELECT statements. 11 SET NOCOUNT ON; 12 UPDATE [fantasyfootball].[dbo].[Admin] 13 SET [E-mail] = @email 14 ,[Password] = @password 15 ,[First_Name] = @firstName 16 ,[Last_Name] = @lastName 17 WHERE [E-mail] = @email Function calling stored procedure 1 public void UpdateAdministrator(String email, String pword,String fname, String lname) 2 { 3 SqlCommand updateAdministrator = new SqlCommand("spUpdateAdministrator"); 4 string connString = ConfigurationManager.ConnectionStrings["fantasyfootballConnectionString"].ConnectionString; 5 SqlConnection conn = new SqlConnection(connString); 6 updateAdministrator.Connection = conn; 7 updateAdministrator.CommandType = CommandType.StoredProcedure; 8 9 using (conn) 10 { 11 //Adding the required parameters 12 updateAdministrator.Parameters.Add("@email", SqlDbType.VarChar); 13 updateAdministrator.Parameters.Add("@password", SqlDbType.VarChar); 14 updateAdministrator.Parameters.Add("@firstName", SqlDbType.VarChar); 15 updateAdministrator.Parameters.Add("@lastName", SqlDbType.VarChar); 16 17 //Setting the values for each parameter 18 updateAdministrator.Parameters["@email"].Value = (string)_Email; 19 updateAdministrator.Parameters["@password"].Value = (string)_Password; 20 updateAdministrator.Parameters["@firstName"].Value = (string)_FirstName; 21 updateAdministrator.Parameters["@lastName"].Value = (string)_LastName; 22 23 updateAdministrator.Connection.Open(); 24 updateAdministrator.ExecuteNonQuery(); 25 updateAdministrator.Connection.Close(); 26 } 27 } 28 29 code behind the update button 1 protected void btnUpdate_click(object sender, ImageClickEventArgs e) 2 { 3 if (Page.IsValid) 4 { 5 Administrator Administrator = new Administrator(txtEMail.Text, txtPWord.Text, txtFName.Text, txtLName.Text); 6 Administrator.UpdateAdministrator(txtEMail.Text, txtPWord.Text, txtFName.Text, txtLName.Text); 7 Response.Redirect("adminhompageadmin.aspx"); 8 } 9 }
VIEWS ON THIS POST

242

Posted on:

Tuesday 27th November 2012
View Replies!

If Else From Statement... Overwrite

(This is a classic asp page pulling data from an oracle database)(I know this is the wrong forum but it's still the same basic fudamentals and the closes to what i need...thanks) I basically just want the first if statement to overwrite the second statement in the case that the criteria of the first if statement is met. So basically if the league_id value is 0 and the team id value is 0 I would like the tSQL function to display main.cfb_division_id = 1" and - Division: I-A"...any help on how to edit my code to do that would be great...thanksCODE\t\t\t\tIf iLeagueID = "0" and iTeamID = "0" then\t\t\t\ttSQL = tSQL & " AND main.cfb_division_id = 1"\t\t\t\ttPlayerFilter = tPlayerFilter & " - Division: I-A"\t\t\t\tEnd If \t\t\t\tIf iLeagueID = "0"\tThen\t\t\t\ttSQL = tSQL\t\t\t\ttPlayerFilter = tPlayerFilter \t\t\t\tElseIf iLeagueID = "2" Then\t\t\t\ttSQL = tSQL & " AND main.cfb_division_id = 2"\t\t \t\ttPlayerFilter = tPlayerFilter & " - Division: I-AA"\t\t\t\tElseIf iLeagueID = "9" Then\t\t\t\ttSQL = tSQL & " AND main.cfb_division_id = 9"\t\t\t\ttPlayerFilter = tPlayerFilter & " - Division: I-A + I-AA"\t\t\t\tElseIf iLeagueID = "1" Then\t\t\t\ttSQL = tSQL & " AND main.cfb_division_id = 1"\t\t\t\ttPlayerFilter = tPlayerFilter & " - Division: I-A"\t\t\t\tEnd If
VIEWS ON THIS POST

181

Posted on:

Tuesday 27th November 2012
View Replies!

How to allow html in textbox

When I try to submit a form with html in my textbox, I get this error:A potentially dangerous Request.Form value was detected from the client (txtDescription="... energy!* Just 15 ...").
VIEWS ON THIS POST

137

Posted on:

Tuesday 27th November 2012
View Replies!

DataGrid Overwritting

I am doing some testing of an application and ran into a problem.\tI have a datagrid that that uses a dataview as its source.\tThe dataview is a filtered view of a cached dataset (ie, the user can search the cached dataset).\tIf I open multiple windows on my pc and do two differents searches, each page gets the correct data.\tWhen I change pages on the datagrid at the same time on the seperate windows, the datagrids mess up.\tSometimes I get errors and sometimes one window pulls the data that is in the other window.Has anyone seen this before\tIs this just because I am on one computer with more than one window open or will this happen even when multiple users on different PC's are hitting the site
VIEWS ON THIS POST

181

Posted on:

Tuesday 27th November 2012
View Replies!

No Module Files in 2008?

I am finally moving from VS2003 to VS2008. One of the things that I have noticed in this version is that there are no module files. Modules were my primary way of declaring global variables and shared functions that pages within my applications would be using.Is there another way to do this I know I could use session.item for variables but even then they don't get magically declared when the application runs (not matter which page ends up being called first) like modules do. CharlesQuality Assurance/Developer
VIEWS ON THIS POST

189

Posted on:

Friday 28th December 2012
View Replies!

Directory Error

Could not find a part of the path "C:\".This is the error I am getting.Both WPG and IUSR have full control (just for testin of course).\tIs there anyting else I am missingAnyone ever see this
VIEWS ON THIS POST

154

Posted on:

Tuesday 1st January 2013
View Replies!

RadioButtonList Wrap Format. Aligning text.

I have an asp:radiobuttonlist that has several selections. My problem is when the sentence wraps, it goes beneath the button. Is there any way that I can align the text so it falls under the beginning of the first letter of the sentenceExample(the underscore is meant as a space):O This is my problem whenI wrap the text O This is what I am looking__for when I wrap it.
VIEWS ON THIS POST

173

Posted on:

Tuesday 1st January 2013
View Replies!

Opening a server file on client machine...

,My users generate certain reports through our website. Once they're done creating these reports, they need to export these reports back to their local box. So what I need to do is:1. Create a temp file and write the contents of the report to this file2. Get user to "Save" this temp file to their local drive so they can later on open/print/modify the file.As for writing to this temp file, I simply use: System.IO.Path.GetTempFileName() and I write the content of the report to it.My problem is how do I get the users to actually save this file in their local machineJust to give you a background, the user clicks on a button saying "Export Report". The next thing, the report gets saved on a temp file in server. The last step should prompt the user to save the file to their local box..
VIEWS ON THIS POST

93

Posted on:

Tuesday 1st January 2013
View Replies!

Streaming Music Through POST?

I am making a ASP.NET site for my band to get our songs out there. I made a and dropped an to load the song picked from a dropdownlist.The problem is that I want the music to continue when someone clicks a server-side link on the site. Reason being, that I have links to my Lyrics and Photos specific to each song. When they click Lyrics, I want the song to keep playing from where it was, but load the TextArea with the Song Lyrics. Currently, the song restarts when I do this. I've tried to use an to hold the player, but I can't get the to function properly.ViewState don't work either.Sooooo, my question is, how can I Refresh one area of the current page ( the main textarea ) and keep the music playing (in a Literal Control) without a restart. I know I can use JavaScript to keep the page from posting while still changing the data loaded, but was hoping there was a way to stop the server from restarting the music while making a server-side hop (mainly cause I coded all that out already). It currently uses SQL Server 2005 as a backend, and recycles a page (Index.aspx) loading different data based on the user-selection based through web controls
VIEWS ON THIS POST

157

Posted on:

Wednesday 2nd January 2013
View Replies!

Set file permissions w/ asp.net

Does anyone know how to set file permissions via asp.net\tI have a page that allows me to upload files, but I want to be able to set the permissions on the file after I upload it.\tAny ideas\t
VIEWS ON THIS POST

171

Posted on:

Wednesday 2nd January 2013
View Replies!