Change Database Type by Editing Project File

Tips submitted by ASPMaker users

Change Database Type by Editing Project File

Postby andrewbsc » Mon May 29, 2017 8:01 pm

I have been using ASPMaker to connect to Access all the while.

I outgrew Access last year.

And everyone knows upsizing from Access to SQL is sort of effortless in SQL Server/Access, BUT a nightmare in ASPMaker.
This is because when you change database type in ASPMaker app, the app 'forgets' everything and you will need to re-do all fields in all tables!

Voila! I found a trick!

Open your AGP with a notepad editor. Try Notepad ++, even better.

Locate this line at the top of the file.

Database DBName="MyDatabase.MDB" DBType="ACCESS" DBPath="database\" DBUseServerMapPath="0" DBPhyPath="C:\Database\Web\MyDatabase.mdb" DBUID="" DBPwd="" DBQuoteS="[" DBQuoteE="]" DBConnstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" DBADOVer="3.6" DBDBMSName="ACCESS" DBDBMSVer="4.0" DBOLEDBVer="N.A." DBProviderName="N.A." DBProviderVer="N.A." DBSchema="" MaxUploadSize="900000000" SecUserLevelFld="User Level ID" SecDefault="0,"Default",0;1,"Finance",15;2,"HR",15;3,"Sales",15;4,"Enrolment",15;5,"Investor",104;6,"Intern",0;7,"Production",111" SecuUserIDFld="Name" SecUserProfileFld="User Profile" UseDynamicUserLevel="0" UserLevelTbl="UserLevels" UserLevelIdFld="UserLevelID" UserLevelNameFld="UserLevelName" UserLevelPrivTbl="UserLevelPermissions" UserLevelPrivTblNameFld="TableName" UserLevelPrivUserLevelFld="UserLevelID" UserLevelPrivPrivFld="Permission" SecuParentUserIDFld="Supervisor" DBConnstrOra="">

AND Change it MANUALLY in the notepad to:

<Database DBName="MyDatabaseSQL" DBType="Microsoft SQL Server 2005/2008/2012" DBPath="" DBUseServerMapPath="0" DBPhyPath="" DBUID="sa" DBPwd="password" DBQuoteS="[" DBQuoteE="]" DBConnstr="Provider=SQLNCLI11;Persist Security Info=False;Data Source=SERVER\SERVERSQL;Initial Catalog=lv2sql;User Id=sa;Password=password" DBADOVer="6.1" DBDBMSName="Microsoft SQL Server" DBDBMSVer="10.50.4000" DBOLEDBVer="02.80" DBProviderName="sqlncli11.dll" DBProviderVer="11.0.6518.0" DBSchema="dbo" MaxUploadSize="2000000" SecUserLevelFld="" SecDefault="0,&quot;Default&quot;,0" SecuUserIDFld="Name" SecUserProfileFld="" UseDynamicUserLevel="0" UserLevelTbl="" UserLevelIdFld="" UserLevelNameFld="" UserLevelPrivTbl="" UserLevelPrivTblNameFld="" UserLevelPrivUserLevelFld="" UserLevelPrivPrivFld="" SecuParentUserIDFld="Supervisor">

Where MyDatabaseSQL is your SQL Database name, and password is your SQL DB password. SERVER\SERVERSQL is your SQL server name.

Save the notepad. Works beautifully when you next open your AGP file in ASPMaker. No more re-doing all the fields and tables.

Andrew Boey
Posts: 41
Joined: Fri Mar 08, 2013 11:54 pm

Return to User Submitted Tips (ASPMaker)