AccessViolationException when using Sybase ASE ADO.NET connectorto fill DataSet

B

Ben

Hello,

I've ran into an odd error. I'm getting the following error:
System.AccessViolationException was unhandled
Message="Attempted to read or write protected memory. This is often
an indication that other memory is corrupt."
Source="Sybase.Data.AseClient"
StackTrace:
at ᜀ.ᜀ(IntPtr A_0, IntPtr& A_1)
at Sybase.Data.AseClient.AseCommand.ᜀ()
at Sybase.Data.AseClient.AseCommand.ᜂ()
at Sybase.Data.AseClient.AseCommand.ᜄ()
at Sybase.Data.AseClient.AseCommand.ᜀ(CommandBehavior A_0)
at
Sybase.Data.AseClient.AseCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior
commandBehavior)
at System.Data.Common.DbDataAdapter.FillInternal(DataSet
dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords,
String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
at SybMusicScan.Form1.listGenres() in C:\Documents and
Settings\El Bekko\My Documents\Visual Studio
2005\Projects\SybMusicScan\SybMusicScan\Form1.cs:line 52
at SybMusicScan.Form1.Form1_Load(Object sender, EventArgs e) in
C:\Documents and Settings\El Bekko\My Documents\Visual Studio
2005\Projects\SybMusicScan\SybMusicScan\Form1.cs:line 43
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean
fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at
System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at
System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr
hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef
hWnd, Int32 nCmdShow)
at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
at System.Windows.Forms.Control.set_Visible(Boolean value)
at
System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32
reason, ApplicationContext context)
at
System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32
reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at SybMusicScan.Program.Main() in C:\Documents and Settings\El
Bekko\My Documents\Visual Studio
2005\Projects\SybMusicScan\SybMusicScan\Program.cs:line 17
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[]
args)
at System.AppDomain.ExecuteAssembly(String assemblyFile,
Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()


It occurs in the following bit of code:
public void listGenres()
{
AseCommand query = new AseCommand("SELECT * FROM genres",
oAseConn);
AseDataAdapter adapter = new AseDataAdapter(query);
ds.Reset();
ds.Clear();
adapter.Fill(ds);

dataGridView1.DataSource = null;
dataGridView1.DataSource = ds.Tables[0];
}


Any idea?

Thanks,
Ben
 
Y

Yanela Somdaka

Hi Ben

Did you finally manage to get this error fixed? It's happened all the time for me now even when using asedatareader.....HELP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top