Flovit Posted April 26, 2004 Posted April 26, 2004 (edited) please tell me what is its problem thanks Look at this part of code : ------------- this.dbCon.ConnectionString = @"Jet OLEDB:Global Partial Bulk Ops=2; Jet OLEDB:Registry Path=;Jet OLEDB:Database Locking Mode=1; Data Source="+ Server.MapPath("Databse/myDB.mdb")+";"; Jet OLEDB:Engine Type=5;Provider=""Microsoft.Jet.OLEDB.4.0""; Jet OLEDB:System database=;Jet OLEDB:SFP=False; persist security info=False;Extended Properties=; Mode=Share Deny None;Jet OLEDB:Encrypt Database=False; Jet OLEDB:Create System Database=False; Jet OLEDB:Don't Copy Locale on Compact=False; Jet OLEDB:Compact Without Replica Repair=False;User ID=Admin; Jet OLEDB:Global Bulk Transactions=1"; ---------------------------------- Edited April 26, 2004 by Flovit Quote
georgepatotk Posted April 26, 2004 Posted April 26, 2004 what is your doubt???? Quote George C.K. Low
Flovit Posted April 26, 2004 Author Posted April 26, 2004 I wanted to set a custom path for my database and using MapPath to set the location but everytime I edit it I get an error again If you know how I must do this please tell me thanks Quote
Administrators PlausiblyDamp Posted April 26, 2004 Administrators Posted April 26, 2004 What error do you get though? IF you display the connectiom string in a MessageBox or TextBox does it appear correct? Check the end of the line containing the Server.MapPath - looks like there may be an extra ; involved there. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
wessamzeidan Posted April 26, 2004 Posted April 26, 2004 I think you can do it without Server.MapPath(), just "Databse/myDB.mdb" Quote Proudly a Palestinian Microsoft ASP.NET MVP My Blog: wessamzeidan.net
Arch4ngel Posted April 26, 2004 Posted April 26, 2004 You're right wessamzeidan... it's what I use for my programs. It's called relative directory. :p :D Quote "If someone say : "Die mortal !"... don't stay to see if he isn't." - Unknown "Learning to program is like going out with a new girl friend. There's always something that wasn't mentioned in the documentation..." - Me "A drunk girl is like an animal... it scream at everything like a cat and roll in the grass like a dog." - Me after seeing my girlfriend drunk and some of her drunk friend. C# TO VB TRANSLATOR
Flovit Posted April 27, 2004 Author Posted April 27, 2004 Im going to try more , but for answer of the question I get Compile-Time Error for Syntax and noticed about ";" by the compiler . thanks Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.