Tuesday, March 27, 2012
can't start sql 2005 service
y I try to start the service, it said following messages.
I use local system account, my other instance sql 2000 can start, I think
it's only YUKON problem, I do not know how to troubleshoot this error.
Can you guys help? Thanks a lot!!Have you checked the SQL Server 2005 error log?
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Britney" <britneychen_2001@.yahoo.com> wrote in message news:urW5U81oFHA.303
6@.TK2MSFTNGP14.phx.gbl...
Hi guys, I have sql 2005 beta 2 installed.. It used to work before, today
I try to start the service, it said following messages.
I use local system account, my other instance sql 2000 can start, I think
it's only YUKON problem, I do not know how to troubleshoot this error.
Can you guys help? Thanks a lot!!|||where do I look for the log?
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message news:%23F
eit92oFHA.3304@.tk2msftngp13.phx.gbl...
Have you checked the SQL Server 2005 error log?
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Britney" <britneychen_2001@.yahoo.com> wrote in message news:urW5U81oFHA.303
6@.TK2MSFTNGP14.phx.gbl...
Hi guys, I have sql 2005 beta 2 installed.. It used to work before, toda
y I try to start the service, it said following messages.
I use local system account, my other instance sql 2000 can start, I think
it's only YUKON problem, I do not know how to troubleshoot this error.
Can you guys help? Thanks a lot!!
Tuesday, March 20, 2012
can't see the sql 2005 box from sql 2000 box
2000. I could see the 2k box from 2005 but not the other way. Is there
something i'm missing or it's not doable? Please let me know. Also, i can't
replicate from 2000 to 2005, right? can i replicate from 2005 to 2000? thank
you very much for your help...
Tejas
Tejas,
this article will explain the compatibility between different versions:
http://msdn2.microsoft.com/en-us/library/ms143241.aspx
As for setting up the SQL 2005 subscription to a 2000 publisher, you can set
this up by registering your 2000 publisher in Management Studio.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||I actually have problems even before doing all this. I can't even register my
2005 box in 2000 SQL EM. I can register the 2000 box in 2005 though. To do
this, I'm using SQL authentication. I have created usernames in both servers.
I dont know if it's doable. Please let me know. Thank you for the article
though.
I will be able to use Transactional(1 way) i assume since my pub/dist is
2000 and sub will be 2005. Please let me know if i understand this crrrectly.
thank you.
|||Tejas,
I probably didn't explain myself clearly - what I was meaning is that you
can register the 2000 SQL Server in SSMS and then create the publication on
the 2000 box using SSMS.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||Hey Paul. I might be missing something maybe. I'll explain to you what i did.
I registered the 2000 box in SSMS. I created a Trans. publication (1 way)
from there. The publisher and dist side is setup. Now I wanted to add a pull
subscription from 2005 box.
What I did was, I went to the publisher properties on the 2000 box, went to
subscribers and tried to add a subscriber there. I supplied the instance
name, SQL authentication etc. for the 2005 box, but it gives me an error
saying
"SQL Server replication requires the actual server name to make a connection
to the server. Connections through a server alias, IP address, or any other
alternate name are not supported. Specify the actual server name, ''.
(Replication.Utilities)
I can ping my 2005 box but can't see SQL on that box from any 2000 boxes.
They are on different windows domain if that makes any difference for SQL
authentication. Please let me know how i would add this subscriber and
subscribe a 2005 box to a 2000 publication.
thank you, paul
Regards,
Tejas Parikh
|||Tejas,
I'll just install SQL 2000 on my 2005 Virtual PC then try to repro this.
Rgds,
Paul
"Tejas Parikh" <TejasParikh@.discussions.microsoft.com> wrote in message
news:258DC9E3-EA16-4A7B-AF7A-2BB853B26529@.microsoft.com...
> Hey Paul. I might be missing something maybe. I'll explain to you what i
> did.
> I registered the 2000 box in SSMS. I created a Trans. publication (1 way)
> from there. The publisher and dist side is setup. Now I wanted to add a
> pull
> subscription from 2005 box.
> What I did was, I went to the publisher properties on the 2000 box, went
> to
> subscribers and tried to add a subscriber there. I supplied the instance
> name, SQL authentication etc. for the 2005 box, but it gives me an error
> saying
> "SQL Server replication requires the actual server name to make a
> connection
> to the server. Connections through a server alias, IP address, or any
> other
> alternate name are not supported. Specify the actual server name, ''.
> (Replication.Utilities)
> I can ping my 2005 box but can't see SQL on that box from any 2000 boxes.
> They are on different windows domain if that makes any difference for SQL
> authentication. Please let me know how i would add this subscriber and
> subscribe a 2005 box to a 2000 publication.
> thank you, paul
> Regards,
> Tejas Parikh
|||Tejas,
I have no problem registering SQL 2005 as a subscriber on my SQP 2000
Publisher box. In fact, I didn't have to register the server in Enterprise
Manager as a SQL Server - it was automatically picked up. As a variation, I
could also create the subscription directly (including having the subscriber
added as I verified from the generated script) from within SSMS. You might
want to try it that way instead.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||Hey Paul. I thought it should be that easy. but my EM doesn't pick it up. I
try to register it and it gives me an error saying the server doesn't exist
or access denied. the username i'm trying to use is a sysadmin on the 2005
box. Do i have to check something in Windows or i'm just crazy to not get it
to work? thank you for your time and help, Paul.
|||Tejas,
have a look in the SQL Server Configuration Manager on the 2005 box and
check onn the protocol properties that the instance isn't hidden. Also, on
the 2000 box, you say that pinging the 2005 box works - is this using the IP
address or the netbios name? If the IP address, then I wonder if a full
trust relationship exists between your domains? What happens if you ping the
netbiosname instead? If this doesn't work, then I think you'll need an alias
set up on the publisher for the subscriber, and an entry in the hosts file.
Also I can't tell if you've tried setting up the subscription while using
SSMS - both push and pull would be interesting.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
Sunday, March 11, 2012
Can''t run integration services package as a sql server agent task
Hi guys, I 've been trying to run an integration services package as server agent scheduled task so that I dont have to manually execute the package every 2 hours. I was following how to guide in msdn to set up a server agant task for integration services package but I'm kind a lost. First of all when I ran the Management Studio and connected to the integration services the server agent does not show up it only shows me runing and stored packages. I can access to the server agent when I connect to the database engine but when I create a task and try to add a step to open a integration services package it does not give me the choice in type box. I couldn't figure out the problem. Is there a way to enable server agent to run under integration services too (not just under database engine) if databse engine is the only place server agents works , why dont I see the option to open a ssis package at adding a step to tasks? or is there a way to automate the process to run the package automatically without using the server agent at all?
Thanks,
Burak
PS I was following the http://msdn2.microsoft.com/en-us/library/ms139805.aspx article
You will find SQL Server Agent only under the relational DB and that is fine.; You should be able to create a job with an step to run the package you want to.
You have 2 option for the step type; you can use a SSIS package type or a command line (CmdExc) type.
This is a KB article with the most common problems when scheduling a package and their workarounds:
http://support.microsoft.com/kb/918760
BTW, Where is the package stored?
|||The server agent is part of the database engine.
You will need to set up the proxy / credential / etc...
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1955723&SiteID=1
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=703968&SiteID=1
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1322146&SiteID=1
|||package is stored in the same file system as the sql server.
By the way when I chose the type as CmdExec it gives me sql error #14250 and it says my command is longer than 3200 chars as it tries to run the whole xml file as a command line prompt I guess. I believe if I can find a way to activate SSIS package option at the package type field I might be able to get pass this problem I'm going to try the solution with the proxy account maybe that will help.
|||Ok I tried to follow the tutorials about how to create proxies and credentials unfortunatly when I expand the security tab of the database engine it just shows me logins and server roles no credentials. I do wonder wouldn't be easier if Microsoft just added the functionality to schedule the packages through Business Intelligence. I'm just frusturated following through all those how to's and at the end of the day still having the same problem.
|||You tried the security folder of the overall server, and not the database that you are using? Are you using SQL Server Management Studio? It should be there....
Can''t run integration services package as a sql server agent task
Hi guys, I 've been trying to run an integration services package as server agent scheduled task so that I dont have to manually execute the package every 2 hours. I was following how to guide in msdn to set up a server agant task for integration services package but I'm kind a lost. First of all when I ran the Management Studio and connected to the integration services the server agent does not show up it only shows me runing and stored packages. I can access to the server agent when I connect to the database engine but when I create a task and try to add a step to open a integration services package it does not give me the choice in type box. I couldn't figure out the problem. Is there a way to enable server agent to run under integration services too (not just under database engine) if databse engine is the only place server agents works , why dont I see the option to open a ssis package at adding a step to tasks? or is there a way to automate the process to run the package automatically without using the server agent at all?
Thanks,
Burak
PS I was following the http://msdn2.microsoft.com/en-us/library/ms139805.aspx article
You will find SQL Server Agent only under the relational DB and that is fine.; You should be able to create a job with an step to run the package you want to.
You have 2 option for the step type; you can use a SSIS package type or a command line (CmdExc) type.
This is a KB article with the most common problems when scheduling a package and their workarounds:
http://support.microsoft.com/kb/918760
BTW, Where is the package stored?
|||The server agent is part of the database engine.
You will need to set up the proxy / credential / etc...
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1955723&SiteID=1
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=703968&SiteID=1
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1322146&SiteID=1
|||package is stored in the same file system as the sql server.
By the way when I chose the type as CmdExec it gives me sql error #14250 and it says my command is longer than 3200 chars as it tries to run the whole xml file as a command line prompt I guess. I believe if I can find a way to activate SSIS package option at the package type field I might be able to get pass this problem I'm going to try the solution with the proxy account maybe that will help.
|||Ok I tried to follow the tutorials about how to create proxies and credentials unfortunatly when I expand the security tab of the database engine it just shows me logins and server roles no credentials. I do wonder wouldn't be easier if Microsoft just added the functionality to schedule the packages through Business Intelligence. I'm just frusturated following through all those how to's and at the end of the day still having the same problem.
|||You tried the security folder of the overall server, and not the database that you are using? Are you using SQL Server Management Studio? It should be there....
Can''t run integration services package as a sql server agent task
Hi guys, I 've been trying to run an integration services package as server agent scheduled task so that I dont have to manually execute the package every 2 hours. I was following how to guide in msdn to set up a server agant task for integration services package but I'm kind a lost. First of all when I ran the Management Studio and connected to the integration services the server agent does not show up it only shows me runing and stored packages. I can access to the server agent when I connect to the database engine but when I create a task and try to add a step to open a integration services package it does not give me the choice in type box. I couldn't figure out the problem. Is there a way to enable server agent to run under integration services too (not just under database engine) if databse engine is the only place server agents works , why dont I see the option to open a ssis package at adding a step to tasks? or is there a way to automate the process to run the package automatically without using the server agent at all?
Thanks,
Burak
PS I was following the http://msdn2.microsoft.com/en-us/library/ms139805.aspx article
You will find SQL Server Agent only under the relational DB and that is fine.; You should be able to create a job with an step to run the package you want to.
You have 2 option for the step type; you can use a SSIS package type or a command line (CmdExc) type.
This is a KB article with the most common problems when scheduling a package and their workarounds:
http://support.microsoft.com/kb/918760
BTW, Where is the package stored?
|||The server agent is part of the database engine.
You will need to set up the proxy / credential / etc...
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1955723&SiteID=1
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=703968&SiteID=1
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1322146&SiteID=1
|||package is stored in the same file system as the sql server.
By the way when I chose the type as CmdExec it gives me sql error #14250 and it says my command is longer than 3200 chars as it tries to run the whole xml file as a command line prompt I guess. I believe if I can find a way to activate SSIS package option at the package type field I might be able to get pass this problem I'm going to try the solution with the proxy account maybe that will help.
|||Ok I tried to follow the tutorials about how to create proxies and credentials unfortunatly when I expand the security tab of the database engine it just shows me logins and server roles no credentials. I do wonder wouldn't be easier if Microsoft just added the functionality to schedule the packages through Business Intelligence. I'm just frusturated following through all those how to's and at the end of the day still having the same problem.
|||You tried the security folder of the overall server, and not the database that you are using? Are you using SQL Server Management Studio? It should be there....
Can''t run integration services package as a sql server agent task
Hi guys, I 've been trying to run an integration services package as server agent scheduled task so that I dont have to manually execute the package every 2 hours. I was following how to guide in msdn to set up a server agant task for integration services package but I'm kind a lost. First of all when I ran the Management Studio and connected to the integration services the server agent does not show up it only shows me runing and stored packages. I can access to the server agent when I connect to the database engine but when I create a task and try to add a step to open a integration services package it does not give me the choice in type box. I couldn't figure out the problem. Is there a way to enable server agent to run under integration services too (not just under database engine) if databse engine is the only place server agents works , why dont I see the option to open a ssis package at adding a step to tasks? or is there a way to automate the process to run the package automatically without using the server agent at all?
Thanks,
Burak
PS I was following the http://msdn2.microsoft.com/en-us/library/ms139805.aspx article
You will find SQL Server Agent only under the relational DB and that is fine.; You should be able to create a job with an step to run the package you want to.
You have 2 option for the step type; you can use a SSIS package type or a command line (CmdExc) type.
This is a KB article with the most common problems when scheduling a package and their workarounds:
http://support.microsoft.com/kb/918760
BTW, Where is the package stored?
|||The server agent is part of the database engine.
You will need to set up the proxy / credential / etc...
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1955723&SiteID=1
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=703968&SiteID=1
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1322146&SiteID=1
|||package is stored in the same file system as the sql server.
By the way when I chose the type as CmdExec it gives me sql error #14250 and it says my command is longer than 3200 chars as it tries to run the whole xml file as a command line prompt I guess. I believe if I can find a way to activate SSIS package option at the package type field I might be able to get pass this problem I'm going to try the solution with the proxy account maybe that will help.
|||Ok I tried to follow the tutorials about how to create proxies and credentials unfortunatly when I expand the security tab of the database engine it just shows me logins and server roles no credentials. I do wonder wouldn't be easier if Microsoft just added the functionality to schedule the packages through Business Intelligence. I'm just frusturated following through all those how to's and at the end of the day still having the same problem.
|||You tried the security folder of the overall server, and not the database that you are using? Are you using SQL Server Management Studio? It should be there....
Can''t run integration services package as a sql server agent task
Hi guys, I 've been trying to run an integration services package as server agent scheduled task so that I dont have to manually execute the package every 2 hours. I was following how to guide in msdn to set up a server agant task for integration services package but I'm kind a lost. First of all when I ran the Management Studio and connected to the integration services the server agent does not show up it only shows me runing and stored packages. I can access to the server agent when I connect to the database engine but when I create a task and try to add a step to open a integration services package it does not give me the choice in type box. I couldn't figure out the problem. Is there a way to enable server agent to run under integration services too (not just under database engine) if databse engine is the only place server agents works , why dont I see the option to open a ssis package at adding a step to tasks? or is there a way to automate the process to run the package automatically without using the server agent at all?
Thanks,
Burak
PS I was following the http://msdn2.microsoft.com/en-us/library/ms139805.aspx article
You will find SQL Server Agent only under the relational DB and that is fine.; You should be able to create a job with an step to run the package you want to.
You have 2 option for the step type; you can use a SSIS package type or a command line (CmdExc) type.
This is a KB article with the most common problems when scheduling a package and their workarounds:
http://support.microsoft.com/kb/918760
BTW, Where is the package stored?
|||The server agent is part of the database engine.
You will need to set up the proxy / credential / etc...
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1955723&SiteID=1
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=703968&SiteID=1
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1322146&SiteID=1
|||package is stored in the same file system as the sql server.
By the way when I chose the type as CmdExec it gives me sql error #14250 and it says my command is longer than 3200 chars as it tries to run the whole xml file as a command line prompt I guess. I believe if I can find a way to activate SSIS package option at the package type field I might be able to get pass this problem I'm going to try the solution with the proxy account maybe that will help.
|||Ok I tried to follow the tutorials about how to create proxies and credentials unfortunatly when I expand the security tab of the database engine it just shows me logins and server roles no credentials. I do wonder wouldn't be easier if Microsoft just added the functionality to schedule the packages through Business Intelligence. I'm just frusturated following through all those how to's and at the end of the day still having the same problem.
|||You tried the security folder of the overall server, and not the database that you are using? Are you using SQL Server Management Studio? It should be there....
Can''t run integration services package as a sql server agent task
Hi guys, I 've been trying to run an integration services package as server agent scheduled task so that I dont have to manually execute the package every 2 hours. I was following how to guide in msdn to set up a server agant task for integration services package but I'm kind a lost. First of all when I ran the Management Studio and connected to the integration services the server agent does not show up it only shows me runing and stored packages. I can access to the server agent when I connect to the database engine but when I create a task and try to add a step to open a integration services package it does not give me the choice in type box. I couldn't figure out the problem. Is there a way to enable server agent to run under integration services too (not just under database engine) if databse engine is the only place server agents works , why dont I see the option to open a ssis package at adding a step to tasks? or is there a way to automate the process to run the package automatically without using the server agent at all?
Thanks,
Burak
PS I was following the http://msdn2.microsoft.com/en-us/library/ms139805.aspx article
You will find SQL Server Agent only under the relational DB and that is fine.; You should be able to create a job with an step to run the package you want to.
You have 2 option for the step type; you can use a SSIS package type or a command line (CmdExc) type.
This is a KB article with the most common problems when scheduling a package and their workarounds:
http://support.microsoft.com/kb/918760
BTW, Where is the package stored?
|||The server agent is part of the database engine.
You will need to set up the proxy / credential / etc...
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1955723&SiteID=1
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=703968&SiteID=1
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1322146&SiteID=1
|||package is stored in the same file system as the sql server.
By the way when I chose the type as CmdExec it gives me sql error #14250 and it says my command is longer than 3200 chars as it tries to run the whole xml file as a command line prompt I guess. I believe if I can find a way to activate SSIS package option at the package type field I might be able to get pass this problem I'm going to try the solution with the proxy account maybe that will help.
|||Ok I tried to follow the tutorials about how to create proxies and credentials unfortunatly when I expand the security tab of the database engine it just shows me logins and server roles no credentials. I do wonder wouldn't be easier if Microsoft just added the functionality to schedule the packages through Business Intelligence. I'm just frusturated following through all those how to's and at the end of the day still having the same problem.
|||You tried the security folder of the overall server, and not the database that you are using? Are you using SQL Server Management Studio? It should be there....
Saturday, February 25, 2012
cant open crystal report on client
Unfortunelly when i run this application on server, everything is okay.
how ?
erickmaybe u should post ur code to figure it out..
thanks,
erick (same name, same location with u :0)
Sunday, February 12, 2012
Cant insert Decimal from textbox
Hopefully someone can help me, im pulling out my hair over this!
Im trying to insert a price into my MSSQL database.
The Column type is decimal.
If i use the following simple script
<%@. Page Language="VB" Debug="true" %>
<%@. Import Namespace="System.Data" %>
<%@. Import Namespace="System.Data.SqlClient" %>
<script language="VB" runat="server">
Sub Submit_Click(Sender As Object, E As EventArgs)
Dim sqlCmd AS SQLCommand
Dim sqlConn as SQLConnection = New SqlConnection("************;")
Dim mySQL as String = "Insert Into Products (Delivery, Price) Values (" & Dvalue.Text & ", " & Pvalue.Text & ")"
sqlCmd = New SQLCommand(mySQL,sqlConn)
sqlConn.Open()
sqlCmd.ExecuteNonQuery()
sqlConn.Close()
End Sub
</script>
<form action="" runat="server">
Delivery - <asp:TextBox ID="Dvalue" runat="server" /><br>
Price - <asp:TextBox ID="Pvalue" runat="server" /><br>
<Asp:Button id="Submit" runat="server" text="Insert" onclick="Submit_Click" />
</form
And add in the values as
Delivery - 12.9999
Price - 56.777
The resulting numbers on the database are
Delivery - 13
Price - 57
Im using 1and1 to host my sql database and using their own SQL admin tool to configure it.
The price column has the following options
Name - Price
Type - Decimal
size(if char) - 19 ( i cant seem to change this)
default value - <blank> (I cant seem to change this)
No other options are ticked (as in nullable, indexed, unique key, primary key, identity)
Is there some setting or something ive missed/ dont know about? (ive only really used access and mysql in the past)
I would really appreciate any helpFirst, I woulduse parameters.
Next, run SQL Profiler and look at what you are actually sending to the database.|||Thanks for the quick reply :)
I cant use SQL Profiler as its a shared account over at www.1and1.co.uk
(I cant seem to even run proper SQL statements that alter tables etc)
The script im trying to fix uses a dataset and the update command, but has the exact same problem as the little example of my woe script i posted here.
Im trying to figure out if its me whos to blame, or some setting on the SQL database i need to annoy them to fix.|||What is the scale set to on your table? Precision will likely be 18, but the default scale is 0, and so you will loose anything to the right of the decimal.|||Im going to call them now. Their administration thingy isnt exactly great.
Thanks for your help|||Suffice to say they dont know whats wrong and ive been put on the mighty waiting list.
They suspect it might to be with the server being German and using , instead of . for the decimal.
So i tried both using their control panel by entering in the SQL for it
Insert Into Products (Price, RRP, Delivery) values ('12.99', '12.99', '22.22')
Which rounded it up again.
There isnt any way i can change the precision from what i can see, so ive had to nag them.
Thanks again for your help.|||I would try to create a table like so (using SQL Script):
CREATE TABLE [dbo].[DecimalTestTable] (
[ID] [int] IDENTITY (1, 1) NOT NULL ,
[DecimalTest] [decimal](18, 5) NULL
) ON [PRIMARY]
Now, if you can insert properly into this table (up to 5 decimal places) then that is your issue.|||I just ran the SQL statement on it
Insert Into DecimalTestTable (DecimalTest) Values ('12.99999')
And Sucess!
12.99999
However, when i try it using their "add new row" it comes up as 129999!
No wonder im confused...
Suffice to say im going to throw their admin tool in the bin and recreate all my tables (nothing much important on them at this stage)
Thanks again, you saved my hairline!
Can't Insert Binary Data Into Sql Mobile
Hi guys, I'm having a problem inserting a file into a SQL Mobile table.
I'm updating the table via a tableadapter designed through the Dataset designer in VS2k5.
The SQL used to insert is "Insert into TestTable (itemid,itemdata) values (@.itemid,@.itemdata)"
Where ItemID is a GUID, and ItemData is an Image field. The tableadapter has typed the parameters as GUID and Binary properly already.
Only problem is when I actually call the command with a byte array containing my file, I get a "Byte truncation" error message.
I remember this working properly in SQL CE 2.0 but so far I don't seem to get it to work in SQL mobile, anyone got any pointers?
How big is the array? If you try to insert array of, say, one byte in size, does that work?
|||Here is a sample of what you need to do to insert binary data into an image column in SQL Mobile:
MemoryStream ms = new MemoryStream();
pictureBox1.Image.Save(ms, ImageFormat.Jpeg);
byte[] imageBytes = ms.ToArray();
SqlCeConnection cn = DatabaseManager.GetInstance().DBConnection;
string sql = "INSERT INTO Photos (ID, Photo) VALUES (NewID(), ?)";
SqlCeCommand command = new SqlCeCommand(sql, cn);
command.Parameters.Add("@.image", SqlDbType.Image, imageBytes.Length);
command.Parameters["@.image"].Value = imageBytes;
command.ExecuteNonQuery();
-Darren