|
I want to send Email to Many Users from One Email Address. I did configured the Database Mail. After Scheduled this Job, It is sending Emails to some users and failing to some users. Following are the Error Message am getting from the Log.
1)The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 3 (2014-12-08T16:01:56).
Exception Message: Cannot send mails to mail server. (The operation has timed out.).
2)The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 3 (2014-12-08T16:02:05).
Exception Message: Cannot send mails to mail server. (Failure sending mail.).
I am getting this Time Out Message even after Updating the Time Out to 60 Sec
|
|
|
|
|
I wanted to add database services to my windows app, but didn't want to use SQL Server, Access or even a DBF file would of been fine.
So the code below works fine, creates a database file, but off the top of your head, will I need to have sql server installed on other client machines?
Dim m_connString As String = "Data Source=(LocalDB)\v11.0; Integrated Security=True;"
Dim myConnection As SqlConnection = New SqlConnection(m_connString)
Dim myQueryString As String = _
"CREATE DATABASE STREAKWAVE ON PRIMARY " & _
"( " & _
" NAME = STREAKWAVE, " & _
" FILENAME = '" & m_storagePath & "\STREAKWAVE.mdf', " & _
" SIZE = 10MB, " & _
" MAXSIZE = 500MB, " & _
" FILEGROWTH = 10% " &
") " & _
" LOG ON " & _
"( " & _
" NAME = STREAKWAVE_Log, " & _
" FILENAME = '" & m_storagePath & "\STREAKWAVE.ldf', " & _
" SIZE = 1MB, " & _
" MAXSIZE = 500MB, " & _
" FILEGROWTH = 10% " & _
") "
|
|
|
|
|
If this code works then you are presumably using SQL CE or similar, which is on the local machine. That is fine as far as it goes, but if you wish to share the database with other clients then you will need SQL server.
|
|
|
|
|
Sorry so late;
got wrapped up in a few projects
What a pain in the ?, I got it working finally, and found a 33 meg download for localDB.
But the speed is day and night, 20 secs using the DBF vs 1 sec using localDB
So VS2013 gives you the localDB, my users will have to install it.
|
|
|
|
|
jkirkerx wrote: off the top of your head, will I need to have sql server installed on other
client machines? Only on the machine that hosts the database(s).
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Thanks Eddy
Just got it to work, create database, tables, records
make the con strings for that.
Better than the oleDB DBF I was going to use, which took 20 sec to write 49 records.
Finished the switch to localDB this morning.
I have never heard of localDB, but it seems handy for vb.net windows apps.
|
|
|
|
|
sql server import export wizard stored procedure
modified 27-Nov-14 2:42am.
|
|
|
|
|
You need to expand your requirements as this is not a question.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
SQL Server will not do that.
There are other tools associated with SQL Server that will.
(Naturally this answer takes a vast leap as to what the question as such was.)
|
|
|
|
|
I have a .sql file. the file size is 401MB. i found that a table say 'pauseddetailes' which stores the values and more than 1,00,000 records which has to be archived periodically but it is not. Due to this i couldn't import the file in MySQL , phpMyadmin. i need to truncate the table 'pauseddetails' and then import the rest of the data in the db. This particular table is independent and doesn't have any foreign key constraint.
I tried increasing the value of the upload size , execution time and memory size in php.ini file still didn't work out.
Is there any possible way. Looking for the solution.
Thanks in advance.
|
|
|
|
|
what you are not able to do, Truncate or addition of new data ?
Whats the error ?
Mark the answer as accepted if that worked for you .
And for down-voters please specify the reason to improve the solution .
|
|
|
|
|
Dear All
we need some help. We have Three Tables in sqlserver2012
Master Table
OrderID PackageID CustomerName
1 1 Abc
2 2 Bcd
3 1 xyz
Child1 Table
OrderID ControlName
1 Row1COlumn1 (It Means Pant in Red Color is selected by user(relation with Child2 Table))
1 Row3Column1 (It Means Gown in Blue Color is selected by user(relation with Child2 Table))
1 Row4Column3 (It Means T Shirt in White Color is selected by user(relation with Child2 Table))
2 Row1Column2 (It Means Tie in Green Color is selected by user(relation with Child2 Table))
2 Row3Column1 (It Means Bow in Red Color is selected by user(relation with Child2 Table))
Child2 Table
PackageID Product Color1 Color2 Color3
1 Pant Red Green Blue
1 Shirt Blue Pink Purple
1 Gown Blue Black Yellow
1 T Shirt Red Green White
2 Tie Red Green White
2 Socks Red Green White
2 Bow Red Green White
We want to have result like
OrderID PackageID CustomerName Pant Gown T Shirt Tie Bow
1 1 ABC Red Blue White x x
Blue
2 2 Bcd x x x Green Red
DB Script
CREATE TABLE [dbo].[Child1](
[Child1ID] [int] NOT NULL,
[OrderID] [int] NULL,
[ControlName] [nvarchar](max) NULL,
CONSTRAINT [PK_Child1] PRIMARY KEY CLUSTERED
(
[Child1ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object: Table [dbo].[Child2] Script Date: 11/11/2014 6:06:56 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Child2](
[Child2ID] [int] NOT NULL,
[PackageID] [int] NULL,
[Product] [nvarchar](max) NULL,
[Color1] [nchar](10) NULL,
[Color2] [nchar](10) NULL,
[Color3] [nchar](10) NULL,
CONSTRAINT [PK_Child2] PRIMARY KEY CLUSTERED
(
[Child2ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object: Table [dbo].[MasterTable] Script Date: 11/11/2014 6:06:56 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[MasterTable](
[OrderID] [int] NOT NULL,
[PackageID] [int] NULL,
[CustomerName] [nvarchar](max) NOT NULL,
CONSTRAINT [PK_MasterTable] PRIMARY KEY CLUSTERED
(
[OrderID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
INSERT [dbo].[Child1] ([Child1ID], [OrderID], [ControlName]) VALUES (1, 1, N'Row1Column1')
GO
INSERT [dbo].[Child1] ([Child1ID], [OrderID], [ControlName]) VALUES (2, 1, N'Row3Column1')
GO
INSERT [dbo].[Child1] ([Child1ID], [OrderID], [ControlName]) VALUES (3, 1, N'Row4Column3')
GO
INSERT [dbo].[Child1] ([Child1ID], [OrderID], [ControlName]) VALUES (4, 2, N'Row1Column2')
GO
INSERT [dbo].[Child1] ([Child1ID], [OrderID], [ControlName]) VALUES (5, 3, N'Row3Column1')
GO
INSERT [dbo].[Child2] ([Child2ID], [PackageID], [Product], [Color1], [Color2], [Color3]) VALUES (1, 1, N'Pant', N'Red ', N'Green ', N'Blue ')
GO
INSERT [dbo].[Child2] ([Child2ID], [PackageID], [Product], [Color1], [Color2], [Color3]) VALUES (2, 1, N'Shirt', N'Blue ', N'Pink ', N'Purple ')
GO
INSERT [dbo].[Child2] ([Child2ID], [PackageID], [Product], [Color1], [Color2], [Color3]) VALUES (3, 1, N'Gown', N'Blue ', N'Black ', N'Yellow ')
GO
INSERT [dbo].[Child2] ([Child2ID], [PackageID], [Product], [Color1], [Color2], [Color3]) VALUES (4, 1, N'T Shirt', N'Red ', N'Green ', N'White ')
GO
INSERT [dbo].[Child2] ([Child2ID], [PackageID], [Product], [Color1], [Color2], [Color3]) VALUES (5, 2, N'Tie', N'Red ', N'Green ', N'White ')
GO
INSERT [dbo].[Child2] ([Child2ID], [PackageID], [Product], [Color1], [Color2], [Color3]) VALUES (6, 2, N'Socks', N'Red ', N'Green ', N'White ')
GO
INSERT [dbo].[Child2] ([Child2ID], [PackageID], [Product], [Color1], [Color2], [Color3]) VALUES (7, 2, N'Bow', N'Red ', N'Green ', N'White ')
GO
INSERT [dbo].[MasterTable] ([OrderID], [PackageID], [CustomerName]) VALUES (1, 1, N'Abc')
GO
INSERT [dbo].[MasterTable] ([OrderID], [PackageID], [CustomerName]) VALUES (2, 2, N'xyz')
GO
USE [master]
GO
ALTER DATABASE [GarmentsTest] SET READ_WRITE
GO
Thanks and Best Regards Umair
|
|
|
|
|
This isn't how this site works, we will help you where you are stuck. But we dont supply solutions to a requirement.
But I would suggest you read up on inner joins[^] and left outer joins[^]
the syntax is similar across the different versions on SQL Server.
after you have read these and get stuck please show us your code and try to explain why its wrong and we will help you further.
Every day, thousands of innocent plants are killed by vegetarians.
Help end the violence EAT BACON
|
|
|
|
|
Next to that, I'd recommend normalizing the data-structure; non-normal tables often make querying more complicated.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I second Eddys suggestion, you're really in for trouble if you keep that table structure.
|
|
|
|
|
Can you redesign your Database tables? It has very bad relations and out put. Why you have 3 columns for Color1, Color2 and Color3 .With this Column how can you get your result .
|
|
|
|
|
A clustering index is an ordered file with two fields; the first field is of the same type as the clustering field of the data file, and the second field is a disk block pointer. There is one entry in the clustering index for each distinct value of the clustering field, and it contains the value and a pointer to the first block in the data file that has a record with that value for its clustering field.
Could any one explain to me how the clustering index have one entry for each distinct value of the clustering field While these below link to an illustrations image show a pointer to the same value 1 in the same block
http://imagizer.imageshack.us/a/img538/3491/AdYgxd.png[^]
|
|
|
|
|
Read the quote a few more times; it matches the diagram. Try reversing the arrows and see if that helps you understand it.
|
|
|
|
|
I have read it many times but I cannot understand it. One entry for each distinct value while the are 2 pointers each of which pointing to the clustering field 1 in the same block file. I tried to reverse the arrows but the same issue 2 pointers 1, and 2 to the same clustering field in the same clustering file as you can see while other pointers point to a distinct values in each clustering block.
|
|
|
|
|
Hmmm, actually it looks like the diagram is slightly confusing. The two arrows to block 1 should both be pointing to the start of block 1.
|
|
|
|
|
How about this:
The records with Dept_number==1 start in block 0
The records with Dept_number==2 start in block 0
The records with Dept_number==3 start in block 1
The records with Dept_number==4 start in block 2
The records with Dept_number==5 start in block 3
The records with Dept_number==6 start in block 4
The records with Dept_number==8 start in block 5
|
|
|
|
|
This could be intended . With this a pointer to the first block in the data file that has a record with that value for its clustering field This seems reasonable
|
|
|
|
|
Hi,
I have a table with floor_id field.
The floor_id is null and I am trying to read it
when I read it using where floor_id = NULL I don't get the correct result but when I try where floor_id IS NULL it's working
so how can I do when passing a parameter like where floor_id = param_floor?
Thanks,
Jassim
Technology News @ www.JassimRahma.com
|
|
|
|
|
You can do it like this in MSSQL
WHERE ISNULL(Floor_id,'') = ISNULL(param_floor,'')
=========================================================
I'm an optoholic - my glass is always half full of vodka.
=========================================================
|
|
|
|
|
As a general solution you can try:
WHERE floor_id = param_floor
OR (floor_id IS NULL AND param_floor IS NULL)
modified 3-Dec-14 15:06pm.
|
|
|
|
|