BambiAria
BambiAria
CC#
Created by BambiAria on 4/28/2023 in #help
Need help with this exception "System.Data.OleDb.OleDbException: 'Could not find installable ISAM."
Yeah it’s a school project
20 replies
CC#
Created by BambiAria on 4/28/2023 in #help
Need help with this exception "System.Data.OleDb.OleDbException: 'Could not find installable ISAM."
Yeah might need to have a look at installing it then 😭
20 replies
CC#
Created by BambiAria on 4/28/2023 in #help
Need help with this exception "System.Data.OleDb.OleDbException: 'Could not find installable ISAM."
Ohhhh might have a look at that then
20 replies
CC#
Created by BambiAria on 4/28/2023 in #help
Need help with this exception "System.Data.OleDb.OleDbException: 'Could not find installable ISAM."
and im not sure what ace version i have installed I presume i have a ace version installed but ive literally never touched databases or OleDb before this
20 replies
CC#
Created by BambiAria on 4/28/2023 in #help
Need help with this exception "System.Data.OleDb.OleDbException: 'Could not find installable ISAM."
just thought access would be easier and now my project dead line is fast approaching
20 replies
CC#
Created by BambiAria on 4/28/2023 in #help
Need help with this exception "System.Data.OleDb.OleDbException: 'Could not find installable ISAM."
ive been told multiple things to it being due to me running with and X64 CPU and not having the device drivers for ISAM and it being due to my connection string but nothing has been clear or helpful yet
20 replies
CC#
Created by BambiAria on 4/28/2023 in #help
Need help with this exception "System.Data.OleDb.OleDbException: 'Could not find installable ISAM."
void GetDatabaseConnection1()
{

//this is going to be ran after logging in
//Creates a connection with the database
string DbfilePath = @"C:\Users\matth\source\repos\Project code iteration one\Project but forms\Project but forms\bin\Debug\ProjectDataBase.accdb";
connection = new OleDbConnection("Provider=Microsoft.ACE.OleDb.16.0;DataSource=" + DbfilePath);
dt = new DataTable();
adapter = new OleDbDataAdapter("SELECT *FROM MainCalculationTable",connection);
connection.Open();
adapter.Fill(dt);
connection.Close();
}

void Insert()
{
connection = new OleDbConnection("Provider=Microsoft.ACE.OleDb.16.0; Data Source = ProjectDataBase.accdb");
GetDatabaseConnection1();
string query = "INSERT INTO StudentTable (YearGroup,FormGroup,FirstName,LastName,ScienceType) VALUES" + "(@yearGroup,@formGroup,@firstName,@lastName,@scienceType)";
cmd = new OleDbCommand(query, connection);

cmd.Parameters.AddWithValue("@yearGroup",yearGroupInput.Text);
cmd.Parameters.AddWithValue("@formGroup",formGroupTextBox.Text);
cmd.Parameters.AddWithValue("@firstName",firstNameTextBox.Text);
cmd.Parameters.AddWithValue("@lastName",lastNameTextBox.Text);
cmd.Parameters.AddWithValue("@scienceType",scienceClassTextBox.Text);

connection.Open();
cmd.ExecuteNonQuery();
connection.Close();

}
void GetDatabaseConnection1()
{

//this is going to be ran after logging in
//Creates a connection with the database
string DbfilePath = @"C:\Users\matth\source\repos\Project code iteration one\Project but forms\Project but forms\bin\Debug\ProjectDataBase.accdb";
connection = new OleDbConnection("Provider=Microsoft.ACE.OleDb.16.0;DataSource=" + DbfilePath);
dt = new DataTable();
adapter = new OleDbDataAdapter("SELECT *FROM MainCalculationTable",connection);
connection.Open();
adapter.Fill(dt);
connection.Close();
}

void Insert()
{
connection = new OleDbConnection("Provider=Microsoft.ACE.OleDb.16.0; Data Source = ProjectDataBase.accdb");
GetDatabaseConnection1();
string query = "INSERT INTO StudentTable (YearGroup,FormGroup,FirstName,LastName,ScienceType) VALUES" + "(@yearGroup,@formGroup,@firstName,@lastName,@scienceType)";
cmd = new OleDbCommand(query, connection);

cmd.Parameters.AddWithValue("@yearGroup",yearGroupInput.Text);
cmd.Parameters.AddWithValue("@formGroup",formGroupTextBox.Text);
cmd.Parameters.AddWithValue("@firstName",firstNameTextBox.Text);
cmd.Parameters.AddWithValue("@lastName",lastNameTextBox.Text);
cmd.Parameters.AddWithValue("@scienceType",scienceClassTextBox.Text);

connection.Open();
cmd.ExecuteNonQuery();
connection.Close();

}
20 replies
CC#
Created by BambiAria on 4/22/2023 in #help
Parameterising this sql?
thank you for ur help
31 replies
CC#
Created by BambiAria on 4/22/2023 in #help
Parameterising this sql?
its still when I check it in the database but ima leave it for a bit tbh
31 replies
CC#
Created by BambiAria on 4/22/2023 in #help
Parameterising this sql?
p sure technically what im modelling should only have every other letter up to O? but I cant really remember and the examiner doesnt know that haha
31 replies
CC#
Created by BambiAria on 4/22/2023 in #help
Parameterising this sql?
tho that is something I need to fix anyway cause year group would be 7-13 whereas form group is 7-13 + letters
31 replies
CC#
Created by BambiAria on 4/22/2023 in #help
Parameterising this sql?
lmao
31 replies
CC#
Created by BambiAria on 4/22/2023 in #help
Parameterising this sql?
ohhhhhhhhhhhhh
31 replies
CC#
Created by BambiAria on 4/22/2023 in #help
Parameterising this sql?
welp thats a new exception atleast
31 replies
CC#
Created by BambiAria on 4/22/2023 in #help
Parameterising this sql?
System.Data.OleDb.OleDbException: 'Data type mismatch in criteria expression.'
31 replies
CC#
Created by BambiAria on 4/22/2023 in #help
Parameterising this sql?
yep that definitely could be it
31 replies
CC#
Created by BambiAria on 4/22/2023 in #help
Parameterising this sql?
or do u have to make ur own when inserting?
31 replies
CC#
Created by BambiAria on 4/22/2023 in #help
Parameterising this sql?
I think thats cause Ive skipped the ID of the table as a query but I thought that was auto assigned by access
31 replies
CC#
Created by BambiAria on 4/22/2023 in #help
Parameterising this sql?
mmmmm okay now im getting that the number query values and destination fields are not the same
31 replies
CC#
Created by BambiAria on 4/22/2023 in #help
Parameterising this sql?
early morning coding is the death of me
31 replies