Showing posts with label code. Show all posts
Showing posts with label code. Show all posts

Monday, March 26, 2012

Read SP source code from VB

Hi,
I'm developing an application to crypt SQL databases and i need to
read SP and Views source code from VB6, if you know how to do this
please answer me.

Greetings."Carpi" <carlos.rodriguez@.sparks-software.com> wrote in message
news:5280f320.0401080621.514fd41f@.posting.google.c om...
> Hi,
> I'm developing an application to crypt SQL databases and i need to
> read SP and Views source code from VB6, if you know how to do this
> please answer me.
> Greetings.

Probably the best place to start is the .Script method of the SQLDMO
objects, which will generate the CREATE statements for all object types.

Simon

Tuesday, March 20, 2012

re: cursor + rounding?

Hi Guys,

I've created a cursor inside a function. When I break it down and execute the code piece by piece, no problem. However, try and parse it together and I get an error - 'Mixing old and new syntax is not allowed?' Something to do with the return statements? as I can alter the function to a procedure and it parses fine. Anyone come across this before?

Also, the values are being rounded when putting them into the cursor, even though I've declared the variables the cursor uses specifically as decimal? How can I get around this please?

Cheers,

Michelle

Michelle:

Can you describe what you are doing? This sounds rather vague.

|||

Blast, it didn't post. Umm, I've sorted the first problem, and I think I may have the answer to the second one. Will give it a go and let you know. Thanks for your help!

Cheers,

Michelle

|||

OK, both of those problems fixed. Should have been

DECLARE product_cursor CURSOR local SCROLL

NOT

DECLARE product_cursor SCROLL CURSOR

and Should have been:

decimal(8,2)

NOT

decimal.

Stupid mistakes! However, now I'm able to parse it fine, but am getting:

Msg 443, Level 16, State 15, Procedure CalculateFreight, Line 15

Invalid use of side-effecting or time-dependent operator in 'SELECT INTO' within a function.

Msg 443, Level 16, State 15, Procedure CalculateFreight, Line 25

Invalid use of side-effecting or time-dependent operator in 'UPDATE' within a function.

when I execute it!?

The SELECT INTO and UPDATE statements are fine when executed alone

Michelle

Re: code to remove data w/o deleting tbl

Hi,
WHat is the code to remove all records in SQL Server table w/o deleting structure of the table ?
I tried DoCmd.DeleteObject acTable, "tblSamples_completed" it deletes the table object.
Is Drop TABLE the right syntax in VBA?
ThanksThe safe answer would be:DELETE FROM tblSamples_completedThe quick answer would be:TRUNCATE TABLE tblSamples_completed-PatP

Wednesday, March 7, 2012

RDA push error

While trying to push a tracked table using RDA.push, I get the following error:

Error Code: 80004005

The message cannot be built. The make message failed.

Minor Err: 28581

Source: Microsoft SQL server 2005 Mobile Edition.

All other tables in the database are getting pulled and pushed correctly. This table is different only in the larger number of columns, around 150. It has a primary key, no other constraints.

Any help to find the reason for this error will be greatly appreciated.

- Paul

As far as I remember there was a bug around when you have more than 128 columns. This got fixed later in the SP1.

Thanks,

Laxmi

|||

Thanks. Laxmi.

SQL server 2005 SP1 was indeed missing, and I installed it. But now the Pull fails, with same error code, and minor error 0. Still investigating what is happening.

Thanks,

Paul

|||

Hi,

The problem persists with SQL server 2005 SP1. Any other idea please?

- Paul

|||

Sorry I should have been more clear when I have said SP1. What I meant was SQL Server Mobile/Everywhere/Compact SP1 and not SQL Server SP1. Please visit the URL below to get you more details on SQL Server Mobile/Everywhere/Compact SP1.

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=774655&SiteID=1

Thanks,

Laxmi Narsimha Rao ORUGANTI

|||

I see this message from time to time in my replication thread, and shortly afterwards processes using the SDF file will start complaining that it has been corrupted.

Here is the stack trace that I receive:

28037 : A request to send data to the computer running IIS has failed. For more information, see HRESULT.

28581 : The message cannot be built. The Make Message failed.

at System.Data.SqlServerCe.NativeMethods.CheckHRESULT()

at System.Data.SqlServerCe.SyncAsyncResult.BeginSyncAndStatusReporting()

at System.Data.SqlServerCe.SyncAsyncResult.SyncThread()

The only thing that I can think of that is unusual is that one of my tables has nearly 1,000,000 rows in it. I have no more than 16 columns in any table. My large table has only 7 columns.

What exactly does the message mean? Would this be causative of my sdf corruption problems, or symptomatic?

How can I determine what SP's have been installed so I can give you better information?

Thanks,

David Johnson

RDA push error

While trying to push a tracked table using RDA.push, I get the following error:

Error Code: 80004005

The message cannot be built. The make message failed.

Minor Err: 28581

Source: Microsoft SQL server 2005 Mobile Edition.

All other tables in the database are getting pulled and pushed correctly. This table is different only in the larger number of columns, around 150. It has a primary key, no other constraints.

Any help to find the reason for this error will be greatly appreciated.

- Paul

As far as I remember there was a bug around when you have more than 128 columns. This got fixed later in the SP1.

Thanks,

Laxmi

|||

Thanks. Laxmi.

SQL server 2005 SP1 was indeed missing, and I installed it. But now the Pull fails, with same error code, and minor error 0. Still investigating what is happening.

Thanks,

Paul

|||

Hi,

The problem persists with SQL server 2005 SP1. Any other idea please?

- Paul

|||

Sorry I should have been more clear when I have said SP1. What I meant was SQL Server Mobile/Everywhere/Compact SP1 and not SQL Server SP1. Please visit the URL below to get you more details on SQL Server Mobile/Everywhere/Compact SP1.

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=774655&SiteID=1

Thanks,

Laxmi Narsimha Rao ORUGANTI

|||

I see this message from time to time in my replication thread, and shortly afterwards processes using the SDF file will start complaining that it has been corrupted.

Here is the stack trace that I receive:

28037 : A request to send data to the computer running IIS has failed. For more information, see HRESULT.

28581 : The message cannot be built. The Make Message failed.

at System.Data.SqlServerCe.NativeMethods.CheckHRESULT()

at System.Data.SqlServerCe.SyncAsyncResult.BeginSyncAndStatusReporting()

at System.Data.SqlServerCe.SyncAsyncResult.SyncThread()

The only thing that I can think of that is unusual is that one of my tables has nearly 1,000,000 rows in it. I have no more than 16 columns in any table. My large table has only 7 columns.

What exactly does the message mean? Would this be causative of my sdf corruption problems, or symptomatic?

How can I determine what SP's have been installed so I can give you better information?

Thanks,

David Johnson

RDA push error

While trying to push a tracked table using RDA.push, I get the following error:

Error Code: 80004005

The message cannot be built. The make message failed.

Minor Err: 28581

Source: Microsoft SQL server 2005 Mobile Edition.

All other tables in the database are getting pulled and pushed correctly. This table is different only in the larger number of columns, around 150. It has a primary key, no other constraints.

Any help to find the reason for this error will be greatly appreciated.

- Paul

As far as I remember there was a bug around when you have more than 128 columns. This got fixed later in the SP1.

Thanks,

Laxmi

|||

Thanks. Laxmi.

SQL server 2005 SP1 was indeed missing, and I installed it. But now the Pull fails, with same error code, and minor error 0. Still investigating what is happening.

Thanks,

Paul

|||

Hi,

The problem persists with SQL server 2005 SP1. Any other idea please?

- Paul

|||

Sorry I should have been more clear when I have said SP1. What I meant was SQL Server Mobile/Everywhere/Compact SP1 and not SQL Server SP1. Please visit the URL below to get you more details on SQL Server Mobile/Everywhere/Compact SP1.

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=774655&SiteID=1

Thanks,

Laxmi Narsimha Rao ORUGANTI

|||

I see this message from time to time in my replication thread, and shortly afterwards processes using the SDF file will start complaining that it has been corrupted.

Here is the stack trace that I receive:

28037 : A request to send data to the computer running IIS has failed. For more information, see HRESULT.

28581 : The message cannot be built. The Make Message failed.

at System.Data.SqlServerCe.NativeMethods.CheckHRESULT()

at System.Data.SqlServerCe.SyncAsyncResult.BeginSyncAndStatusReporting()

at System.Data.SqlServerCe.SyncAsyncResult.SyncThread()

The only thing that I can think of that is unusual is that one of my tables has nearly 1,000,000 rows in it. I have no more than 16 columns in any table. My large table has only 7 columns.

What exactly does the message mean? Would this be causative of my sdf corruption problems, or symptomatic?

How can I determine what SP's have been installed so I can give you better information?

Thanks,

David Johnson

Saturday, February 25, 2012

RDA Error:Failure setting up a non parameterized query, possible incorrect SQL query

I receive this error :

Failure setting up a non parameterized query, possible incorrect SQL query

any 1 can help me plz?

here is my code :

string strDBFile = DBPath;

string strConnLocal = DBConnection;

string strConnRemote = "Provider=sqloledb; "

+ "Data Source=AMNEH; "

+ "Initial Catalog=SIS; "

+ "Integrated Security=SSPI;";

string strURL = "http://" + ipAddress + "/" + virtualDirectory + "/sqlcesa30.dll";

SqlCeRemoteDataAccess rdaNW = new SqlCeRemoteDataAccess();

try

{

rdaNW.LocalConnectionString = strConnLocal;

rdaNW.InternetUrl = strURL;

rdaNW.InternetLogin = "";

rdaNW.InternetPassword = "";

string select = "select * from tabel1 where field1=326";

rdaNW.Pull("tabel1",select,

strConnRemote,

RdaTrackOption.TrackingOnWithIndexes,

"ErrorLog");

}

catch (SqlCeException exSQL)

{

MessageBox.Show("HRESULT:" + exSQL.HResult.ToString() + ",\nNativeError:" + exSQL.NativeError.ToString() + ",\nMessage:" + exSQL.Message);

}

finally

{

rdaNW.Dispose();

}

There is no obvious error with your select query but there are a number of things that can be setup incorrectly when doing RDA. Did you remove the table from the SQL CE database before running this code? I have answered dozens of questions in this forum and on microsoft.public.sqlserver.ce on the topic of troubleshooting RDA. You can use Google Advanced Group Search to search for the posts that apply to RDA.

Darren

RDA and sql server mobile database

hi all

in the wireless application, if i use RDA to pull data from SQL server 2005 database.

do i need to code a exernal class for the PDA to connect to the sql server.

RDA pull data trough what medium, wireless or active sync, if i wanna pull data through wireless what should i do.

By the way, how to i create a database in PDA by using sql server mobile?

Hi Kang,

Please visit SQL Server Mobile Books Online for initial understanding and how to program against SQL Mobile @. http://msdn2.microsoft.com/en-us/library/ms173053(en-US,SQL.90).aspx

Thanks,

LaxmI NRO, MSFT, SQL Mobile, Microsoft Corporation

RDA and sql server mobile database

hi all

in the wireless application, if i use RDA to pull data from SQL server 2005 database.

do i need to code a exernal class for the PDA to connect to the sql server.

RDA pull data trough what medium, wireless or active sync, if i wanna pull data through wireless what should i do.

By the way, how to i create a database in PDA by using sql server mobile?

Hi Kang,

Please visit SQL Server Mobile Books Online for initial understanding and how to program against SQL Mobile @. http://msdn2.microsoft.com/en-us/library/ms173053(en-US,SQL.90).aspx

Thanks,

LaxmI NRO, MSFT, SQL Mobile, Microsoft Corporation